-
Notifications
You must be signed in to change notification settings - Fork 0
Class Timer
Kristian Virtanen edited this page Oct 28, 2024
·
2 revisions
The Timer
class provides functionality for creating and controlling a timer, including setting intervals, pausing, resuming, and stopping the timer. It also includes an event (Tick
) that can be subscribed to, which triggers at each timer interval.
-
Description: Stores the last error message, if any operation fails, including a timestamp in
yyyy-MM-dd HH:mm:ss
format. -
Example:
"2024-10-16 14:30:00: Interval must be between 10 and 100000000 milliseconds."
- Changes from orig. SB: New feature for SBOE.
-
Description: Gets or sets the interval for the timer in milliseconds. The interval must be between
10
and100,000,000
milliseconds. - Changes from orig. SB: none.
- Description: An event that is triggered when the timer ticks based on the specified interval. The event can be subscribed to in order to perform actions at each tick.
- Changes from orig. SB: none.
- Description: Starts or resumes the timer. If the timer was paused, it resumes from where it left off; if the timer was stopped, it starts anew.
- Changes from orig. SB: none.
- Description: Pauses the timer if it is currently running.
- Changes from orig. SB: none.
- Description: Stops the timer completely, resetting its state.
- Changes from orig. SB: New feature for SBOE.
- Description: Checks if the timer is currently running.
-
Returns:
true
if the timer is running and not paused, otherwisefalse
. - Changes from orig. SB: New feature for SBOE.
- Description: Executes the timer only once after the specified delay (in milliseconds). The timer triggers once and then stops.
-
Parameters:
-
delay
: The delay in milliseconds before the timer elapses. It must be between10
and100,000,000
milliseconds.
-
- Changes from orig. SB: New feature for SBOE.