Seconds Function | |
Return the number of seconds that have elapsed since midnight.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION Seconds() AS REAL8
public static double Seconds()
Request Example
View SourceReturn Value
Type:
Double
The number of seconds that have elapsed since midnight in the form seconds.hundredths. Numbers range from 0 to 86,399.
Remarks
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:mO:ss.
The smallest resolution depends on the hardware timer tick.
Examples
This example contrasts the value of Time() with Seconds():
This example uses Seconds() to track elapsed time in seconds:
1LOCAL nStart, nElapsed AS FLOAT
2nStart := Seconds()
3.
4. <paramref name="Statements" />
5.
6nElapsed := Seconds() - nStart
7? "Elapsed: " + NTrim(nElapsed) + " seconds"
See Also