Now
(Engine-Level Function)
Description: | Returns the current time in seconds since midnight. |
Returns: | Numeric |
Usage: | Steady State only. |
Function Groups: | Time and Date |
Related to: | Seconds | Time | CurrentTime |
Format: | Now(Interval) |
Parameters: |
Interval |
Required. Any numeric expression giving the update time in seconds. Fractions of a second may be specified however, Interval must be greater than or equal to 0. |
Comments: | This function is similar to Seconds, except that the update interval can be specified. The Now function is re-evaluated every Interval seconds, and the return value is the time in seconds since midnight, rounded to the next lowest whole multiple of Interval. Now will report time to an accuracy of 0.001 seconds, however it would be unreasonable to expect the function to trigger reliably each millisecond under normal operating conditions. Your CPU speed and the load placed upon it by other processes will both affect the maximum number of times that Now can be triggered each second. |
Example:
ZText(20, 20 { Window location of text }, Time( { Convert from seconds to standard time } Now(1 { Update the time every second }), 2 { Use hh:mm:ss format }), 5, 0 { Color is dark magenta, use default font });
This displays the time on the screen. It updates every second on the second.