Version: 4.1.2
10.1 Timers
| (require web-server/private/timer) |
"private/timer.ss" provides a functionality for running procedures after a given amount of time, that may be extended.
| |||||
| evt : evt? | |||||
| expire-seconds : number? | |||||
| action : (-> void) |
evt is an alarm-evt that is ready at expire-seconds. action should be called when this evt is ready.
| (start-timer-manager cust) → void |
| cust : custodian? |
Handles the execution and management of timers. Resources are charged to cust.
| (start-timer s action) → timer? |
| s : number? |
| action : (-> void) |
Registers a timer that runs action after s seconds.
| (reset-timer! t s) → void |
| t : timer? |
| s : number? |
Changes t so that it will fire after s seconds.
| (increment-timer! t s) → void |
| t : timer? |
| s : number? |
Changes t so that it will fire after s seconds from when it does now.
| (cancel-timer! t) → void |
| t : timer? |
Cancels the firing of t ever and frees resources used by t.