[Up: Time Service]
[Previous: Time Service] [Next: Interface TimeService]
Time is represented in an integer with steps of 100 nanosecond each. The
time base is not the *NIX epoch but the 15th. of October 1582 00:00:00
o'clock. This was choosen because it was already in use with the X/Open DCE
Time Service. Unlike the *NIX epoch the approximate range is 30,000 years,
so there will be no problem in 2038 A.D.
There is a convenience procedure timeT2epoch to create a *NIX
time_t from a TimeBase::TimeT variable.
The types used to transport time and intervall are declared in the namespace
TimeBase, they are described here:
- typedef unsigned long long TimeT
Time in steps off 100 nano seconds
- typedef TimeT InaccuracyT
estimated inaccuracy of time source
- typedef short TdfT
timezone as displacement in minutes from Greenwich
- struct UtcT
contains time, inaccuracy and timezone. Due to historical reasons,
inaccuracy is storedin splitted over two unsigned long variables
inacclo and inacchi storing lower and higher bits of
InaccurcyT.
- struct IntervaT
contains lower_bound and
upper_bound as TimeT two represent an intervall
- enum TimeComparison
types to be used as result of a comparison, see
figure 6.1
- enum ComparisonT
types to describe, wether a comparison should use
the inaccuracy around a time (IntervalC) or not (MidC)
Figure 6.1:
Results comparing two intervalls
 |
[Previous: Time Service] [Next: Interface TimeService]
[Up: Time Service]
Frank Pilhofer
2001-09-28