Difference between revisions of "Clocks and Time"
From Suhrid.net Wiki
Jump to navigationJump to search (→Intro) |
(→Intro) |
||
Line 2: | Line 2: | ||
* Absolute Time - Represents a specific point in time given by milliseconds plus nanoseconds past some point in time fixed by the clock. For the default real-time clock the fixed point is the Epoch (January 1, 1970, 00:00:00 GMT) | * Absolute Time - Represents a specific point in time given by milliseconds plus nanoseconds past some point in time fixed by the clock. For the default real-time clock the fixed point is the Epoch (January 1, 1970, 00:00:00 GMT) | ||
− | * Relative Time - | + | * Relative Time - Represents a time interval milliseconds + nanoseconds seconds long. It generally is used to represent a time relative to now. |
* Standard Java only has a wall clock - calendar time. But real time systems require: | * Standard Java only has a wall clock - calendar time. But real time systems require: | ||
** A monotonic clock. | ** A monotonic clock. |
Revision as of 09:49, 11 December 2011
Intro
- Absolute Time - Represents a specific point in time given by milliseconds plus nanoseconds past some point in time fixed by the clock. For the default real-time clock the fixed point is the Epoch (January 1, 1970, 00:00:00 GMT)
- Relative Time - Represents a time interval milliseconds + nanoseconds seconds long. It generally is used to represent a time relative to now.
- Standard Java only has a wall clock - calendar time. But real time systems require:
- A monotonic clock.
- A countdown clock.
- A CPU execution time clock - measures amount of CPU time consumed by a particular thread or object.
- Time is supported through the HighResolutionTime abstract class. Three implementing concrete classes - absolute, relative and rational.
- Clock is supported through an abstract Clock class.