AbsTime

Description:              Absolute time. This function returns true when a fixed time has been reached.

Returns:                    Boolean

Usage:                       Steady State

Format:                      AbsTime(Enable, Interval, Offset)

Parameters:             Enable          { Boolean }  { required }  { no default }

                                              Enable is any numeric expression giving the condition that allows the timer to operate. When this parameter is true (i.e. not 0), the timer is "running". When this parameter is false (i.e. 0), the timer stops and the function has a value of false.

                                    Interval { numeric }  { required }  { no default }

                                      Interval is any numeric expression giving the time in seconds between the absolute time periods. This parameter must be strictly greater than 0, otherwise the function value will be invalid.

                             Offset  { numeric }  { required }  { no default }

                                      Offset is any numeric expression giving the time in seconds to shift the absolute time from multiples of the Interval time.

Comments:               The AbsTime function is designed to allow events to be scheduled at regular time intervals in real time. It is reset automatically when it appears in a true action trigger, or when it appears in a function that resets its parameters.

Example:      

If AbsTime(1, 86400 { 24 hrs }, 28800 { shifted 8 hrs });

[

  ... 

]

In the example above, the script will be executed every 86400 seconds (24 hours), offset by 28800 seconds (8 hours) from midnight. This means that the trigger will become true at 8:00 AM every morning when the script executes. The function will then be reset to wait until 8:00 AM the following day to execute again.

If AbsTime(1, 3600 { 1 hr }, 0 { not shifted });

[

  ... 

]

The example displayed above allows a user to schedule an event to run on the hour, every hour.

See Also:

DateNum | Day | Month | Now | RTimeOut | Seconds | SetClock | TimeOut | Today | Year