Chapter 10. High-Resolution Time

As you might expect, time is an important feature of many real-time systems. The RTSJ needed a more powerful notion of time than the java.util.Date class provides. The HighResolutionTime class and its three subclasses— AbsoluteTime, RelativeTime, and RationalTime—do two things for the RTSJ. They give it a polymorphic representation of time that let the RTSJ APIs (and the programs that use them) use intervals in time, points in time, and an interesting representation of frequency. The RTSJ time classes also give it a representation of time that has nanosecond resolution and millions of years of range.

Get Real-Time Java™ Platform Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.