timer
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | timer [2006/08/29 16:08] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Synopsis: | ||
+ | [[timer]] | ||
+ | [[timer]] -list \\ | ||
+ | [[timer]] //[see flags below]// < | ||
+ | [[timer]] -update //[see flags below]// \\ | ||
+ | [[timer]] -delete < | ||
+ | [[timer]] -delete all | ||
+ | |||
+ | ======Description: | ||
+ | This command runs the //< | ||
+ | You can have as many timers as you want. This command always returns | ||
+ | immediately. | ||
+ | runs as soon as it is not busy. Therefore, there are no guarantees exactly | ||
+ | when //< | ||
+ | |||
+ | All timers have a unique reference name. You can specify a reference name | ||
+ | with the **-refnum** option. | ||
+ | The reference name can be any length. | ||
+ | **-delete** option with the reference name. | ||
+ | |||
+ | The **-repeat** option sets how many cycles of waiting and executing | ||
+ | //< | ||
+ | then the timer will repeat until you delete it (or the client exits). | ||
+ | |||
+ | The **-cancel** option specifies that the timer should not execute if the window | ||
+ | or server it is bound to (see below) have gone away during the interval. | ||
+ | By rule, non-cancelable timers cannot guarantee they will go off in the | ||
+ | same window or server they were created in. If you need this guarantee, | ||
+ | you must make the timer cancelable. | ||
+ | |||
+ | ======Server, | ||
+ | Each timer binds itself to either a window or a server, or neither. | ||
+ | that binds to a window is known as a //window timer// and a timer that binds | ||
+ | to a server is known as a //server timer// | ||
+ | known as a //general timer// | ||
+ | |||
+ | Each timer is either a //server timer//, a //window timer// or a //general | ||
+ | timer// | ||
+ | that was caused by server data (such as an [[on public]]), or when you use the | ||
+ | **-server //< | ||
+ | you do [[timer]] otherwise, or when you use the **-window //< | ||
+ | flag. A //general timer// is created only when you use the **-general** flag. | ||
+ | |||
+ | Just before a //server timer// executes //< | ||
+ | set to the timer' | ||
+ | current window. | ||
+ | [[server|deleted]] it), and the [[timer]] is cancelable, the timer is | ||
+ | silently canceled and does not execute. | ||
+ | and the [[timer]] is not cancelable, the timer changes into a //general timer//. | ||
+ | |||
+ | A //window timer// works exactly the same, except the current window is | ||
+ | set to the window the timer is bound to, and the current server is set to | ||
+ | that window' | ||
+ | |||
+ | A //general timer// does not change the current window or current server | ||
+ | before executing //< | ||
+ | the server you are connected to in a //general timer//. | ||
+ | |||
+ | ======Options: | ||
+ | |-delete < | ||
+ | |-delete all | delete all timers | | ||
+ | |-delete_for_window < | ||
+ | |-list | ||
+ | |-refnum < | ||
+ | |-repeat < | ||
+ | |-cancelable | ||
+ | |-update | ||
+ | |-window < | ||
+ | |-server < | ||
+ | |-general | ||
+ | |||
+ | ====== Examples: ====== | ||
+ | To create a reminder that X Files will be on in 10 minutes: | ||
+ | timer 600 { | ||
+ | beep | ||
+ | echo *** X Files is on! | ||
+ | echo *** Why are you still on irc?! | ||
+ | } | ||
+ | |||
+ | To assign a specific refnum to that timer: | ||
+ | timer -ref 103 600 { ... } | ||
+ | timer -ref foo 600 { ... } | ||
+ | |||
+ | To delete all pending timers: | ||
+ | timer -del all | ||
+ | |||
+ | To create a general timer that isn't tied to a window or server: | ||
+ | timer -g 15 { echo Hi! 15 seconds have gone by. } | ||
+ | |||
+ | |||
+ | ======History: | ||
timer.txt · Last modified: 2006/08/29 16:08 by 127.0.0.1