Return the number of seconds that have elapsed since midnight.
XSharp.Core (in XSharp.Core.dll) Version: 2.2a
Syntax View Source
FUNCTION Seconds() AS REAL8
public static double Seconds()
The number of seconds that have elapsed since midnight in the form seconds.hundredths. Numbers range from 0 to 86,399.
Seconds() provides a simple method of calculating elapsed time during program execution, based on the system clock. It is related to the Time() function, which returns the system time in the form hh:mm:ss. The smallest resolution depends on the hardware timer tick.
This example contrasts the value of Time() with Seconds():
? Time() // 10:00:00
? Seconds() // 36000.00
This example uses Seconds() to track elapsed time in seconds:
LOCAL nStart, nElapsed AS FLOAT
nStart := Seconds()
nElapsed := Seconds() - nStart
? "Elapsed: " + NTrim(nElapsed) + " seconds"