Timer
Last updated
Last updated
The Timer class is a static class that manages timer events for a script.
public static class Timer
Cancels a repeating timer.
Syntax[System.Obsolete("Named timers are deprecated. Use the IEventSubscription returned from Timer.Create to cancel a timer.", false)] public static Cancel ( name)
Parameters
name
Name of the timer to cancel.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
Generates a one time event.
SyntaxParameters
initialDurationSeconds
The minimum duration to elapse before the event is generated in seconds.
handler
Returns
Documentation for this section has not yet been entered.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
Generates a one time event.
SyntaxParameters
initialDuration
The minimum duration to elapse before the event is generated.
handler
Returns
Documentation for this section has not yet been entered.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
Generates a one time event.
SyntaxParameters
initialDurationSeconds
The minimum duration to elapse before the event is generated in seconds.
handler
persistent
Set to true to continue generating events, false to stop after the first one
Returns
Documentation for this section has not yet been entered.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
Generates a repeating event with an initial duration and a repeat duration.
SyntaxParameters
initialDurationSeconds
The minimum duration to elapse before the event is generated in seconds.
repeatDurationSeconds
After the initial duration, events will be generated at this interval in seconds.
handler
Returns
Documentation for this section has not yet been entered.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
Generates a one time event.
SyntaxParameters
initialDuration
The minimum duration to elapse before the event is generated.
handler
persistent
Set to true to continue generating events, false to stop after the first one
Returns
Documentation for this section has not yet been entered.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
Generates a repeating event with an initial duration and a repeat duration.
SyntaxParameters
initialDuration
The minimum duration to elapse before the event is generated.
repeatDuration
After the initial duration, events will be generated at this interval.
handler
Returns
Documentation for this section has not yet been entered.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
SyntaxParameters
initialDuration
The minimum duration to elapse before the event is generated.
repeatDuration
After the initial duration, events will be generated at this interval.
handler
name
A short string to identify this Timer.
Remarks
RequirementsNamespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
The to be called when the time has elapsed.
The to be called when the time has elapsed.
The to be called when the time has elapsed.
The to be called when the time has elapsed.
The to be called when the time has elapsed.
The to be called when the time has elapsed.
Generates a repeating event with an initial duration and a repeat duration. The event will continue as long as the script is active or until is called.
[System.Obsolete("Named timers are deprecated. Use the IEventSubscription returned from Timer.Create to cancel a timer.", false)] public static Create ( initialDuration, repeatDuration, handler, name)
The to be called when the time has elapsed.