Documentation

alarm

Syntax: %alarm(pattern|id, setTime)

Set or returns the time in milliseconds left until an existing alarm trigger fires.

Examples:

#ALARM "example" {+3} {#ECHO Fired.}

#ALARM {+2} {#SHOW ID:%alarm(example

Creates 2 alarms, the second one fires after 2 seconds and displays the time remaning for the first. You computer speed will affect how close to 1000 both numbers are.

#ALARM "adjust" {*4} {#ECHO Fired.}
#ALARM {+2} {#CALL %alarm(adjust,1000)}
Creates 2 alarms, the second one fires after 2 seconds and changes the time remaning for the first to 1 second. This changes only affects the alarm until it fires, then the pattern is back in full affect.
To permanently change an alarm's pattern use the #ALARM command.

Add comment

Login or register to post comments