Difference between revisions of "Clocks and Time"
From Suhrid.net Wiki
Jump to navigationJump to search (→Intro) |
|||
Line 1: | Line 1: | ||
= Intro = | = Intro = | ||
− | * Absolute Time - | + | * 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 - A value expressed as relative to some other time value (usually the current value). e.g. 10000 milliseconds. | * Relative Time - A value expressed as relative to some other time value (usually the current value). e.g. 10000 milliseconds. | ||
* 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. | ||
** A countdown clock. | ** A countdown clock. | ||
− | ** A CPU execution time 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. | ||
+ | |||
[[Category:RealtimeJava]] | [[Category:RealtimeJava]] |
Revision as of 09:47, 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 - A value expressed as relative to some other time value (usually the current value). e.g. 10000 milliseconds.
- 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.