Title: | CLOCK function value oberflow |
Document: | clock |
Author: | Michael Marxmeier (mike@msede.com) |
Keywords: | CLOCK |
CLOCK function value oberflow
Q: As we use the CLOCK statement very often as sequential number
of record i'd like to know what will happen in the year 2000 with this
number. Will it start from 0 or it will go on by exponential values ?
A: The CLOCK value will exceed the mantissa precision of REAL
variables in September 2001 with Eloquence versions before A.06.30.
- Eloquence version A.06.30 and above are not affected since they
use an increased real precision of 14 digits.
- For previous Eloquence versions this should not cause a problem
either because this will simply loose the last digit resulting in
a CLOCK resolution of 10ms instead of 1ms. This hardly a problem.
The only possible problem is a different representation by DISP or
VAL$ (using exponent form) of CLOCK values which we don't expect
to be widely used.
We discussed a few alternatives (like changing the reference point)
and they are more likely to cause problems since some software
is expecting CLOCK to be increasing (and uses CLOCK values with
a database).
We don't recommend to use the CLOCK variable for anything but time
measurements. On Windows NT it will restart with 0 each time the
system is rebooted and even on UNIX with faster systems the 1ms
resolution is no guarantee of a unique value.
For upcoming Eloquence versions there may be a config option
to define the CLOCK reference point or an alternative statement which
provides access to a higher resulution clock source.
Background
On the HP260, the CLOCK returned the number of milli-seconds since last
re-boot. This is how it is implemented on Windows NT. On the UNIX
platform the CLOCK value returned the number of milli-seconds since
the UNIX epoch (1/1/70), however this was not guaranteed in the
documentation.
|