A timer is a device that increments or decrements a counter at a fixed frequency. Computer timers are often used to check against some set value; when the counter's value matches that value some specific action is taken. Most systems typically have at least one hardware timer that's used to implement a larger set of software timers.
Overview[edit]
Hardware timers[edit]
Software timers[edit]
Alternatives[edit]
API support[edit]
- Main article: List of timer APIs
Timers play a crucial rule in many applications for a variety of jobs such as periodical checking of information. Many programming languages provide easy ways of scheduling timer tasks. Most operating systems also offer a way of setting up timer tasks. For example, on POSIX systems one could setup an alarm which would generate the SIGALRM signal after a specified number of seconds. Likewise, on Windows, the SetTimer Win32 API function can be used to call a callback function after a specific amount of time.
See also[edit]