Time

Time is a quantity of some time unit. A particular point in time is represented by an instance of a class derived from TTime, while the passage of time is represented by a clock. A time instance might represent a point in time on a particular clock, an elapsed time, or the duration for a delay. To know what a time instance represents, you need to know the context in which the time is being used and what clock it is being used with.

Classes derived from TTime are used to represent time. The system provides TTime derivations for most common time units--other time units are provided by other parts of the system, such as sound and video. TTime provides operators for arithmetic and comparison.


With the Time services, you can model everything from extremely small time intervals to intervals that represent millions of years. However, as the time range increases, the resolution decreases. If you measure something on the order of years, the resolution is not accurate to a nanosecond. The system provides picosecond resolution up to about 1.25 hours, microsecond resolution up to about 142 years, and second resolution up to about 1.4281E+8 years.

NOTE The wide range of time intervals is possible because time is represented by a double. Since all time calculations are floating-point calculations, the precision makes it likely that == operators return False when time values are compared, even when the times are essentially the same.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker