Rockwell Automation 6008-SI IBM PC I/O SCNNR 6008-SI User Manual
Page 111

Chapter 9
General Support Features
9-4
systime
returns the system time in the form hhmmssss. Although the system
returns the time in hundredths of seconds and systime passes along the
information, the actual accuracy is only about 1/18 of a second, 55 ms.
Calling sequence:
ltime = systime(
time_array
);
Arguments:
either a character[4] array, or the constant pointer NULL.
CAUTION: If the argument is not zero (the defined constant
NULL), systime treats it as a pointer and writes data to the first
eight bytes it points to. If the argument is not in fact a pointer,
the user program could crash or have unpredictable results.
Returned values:
ltime, a long integer: the system time including hundredths of seconds;
e.g. 14402232 would be the function value at 2:40:22.32 p.m.
If the array is provided, this routine fills the four cells with the current
hour, minute, second, and hundredths of seconds according to the
system clock. You can easily use this information to calculate the
number of seconds since midnight:
short time[4];
double bclk;
. . .
systime(time);
bclk = 3600*time[0] + 60*time[1] + time[2] + .01*time[3];
The hundredths of seconds are accurate to only +6 (55 ms), so you may
prefer to deal in whole seconds:
short time[4];
long clk;
. . .
systime(time);
clk = 3600*time[0] + 60*time[1] + time[2];