WakeupAt (System function)

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Wake up at a specific time in milliseconds (System class)

[Introduced in Sirius Mods 7.9]

The WakeupAt function is an enhanced alternative as the User Language Pause statement, allowing wakeup time resolution of 1 millisecond, and returns the current time in milliseconds.

Syntax

[%number =] %(System):WakeupAt( timeInMilliseconds)

Syntax terms

%numberThe current time, after waking up, in milliseconds.
%(System) The class name in parentheses denotes a shared method. WakeupAt can also be invoked via a System object variable, which may be Null.
timeInMilliseconds The time, in milliseconds, at which to wake up. This may not be more than 12 hours in the future.

Examples

The following code fragment pauses for 1 second at the start of each iteration of the Repeat loop:

%time = %(system):currentTimeMilliseconds repeat %time = %time + 1000 %time = %(system):wakeupAt(%time)

See also