Clocks and Time

From Suhrid.net Wiki
Revision as of 09:47, 11 December 2011 by Suhridk (talk | contribs) (→‎Intro)
Jump to navigationJump to search

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.