Cicode Programming Reference > Cicode Function Categories > Time and Date Functions Introduction > SysTime

SysTime

Gets the CitectSCADA internal system millisecond counter. The counter is not based on time, but counts from 0 up to the maximum integer value and then back to 0.

You can use this function to time events down to the millisecond level, either by subtracting the current SysTime from the SysTime at the start of the event, or by using the SysTimeDelta() function (which will give the same result).

The SysTime() function does not return the time of day. Use the Time() or TimeCurrent() function to obtain the time of day.

Time/date functions can only be used with dates between 1980 and 2035. You should check that the date you are using is valid with Cicode similar to the following:

IF StrToDate(Arg1)>0 THEN
...
ELSE
...
END

Syntax

SysTime()

Return Value

The CitectSCADA internal system millisecond counter (as an integer).

Related Functions

SysTimeDelta, Time, TimeCurrent

Example

Start=SysTime();
! Gets the current time.
... Delay=SysTime()-Start;
! Sets Delay to the time difference, in milliseconds.

See Also

Time/Date Functions