From WikiChip
Difference between revisions of "Timer"

(Created page with "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 counte...")
 
(See also)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
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 processors typically have at least one hardware timer that's used to implement a larger set of software timers.
+
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 ==
 +
{{Empty section}}
 +
 
 +
=== Hardware timers ===
 +
{{empty section}}
 +
 
 +
=== Software timers ===
 +
{{empty section}}
 +
 
 +
== Alternatives ==
 +
{{Empty section}}
 +
 
 +
== API support ==
 +
{{main|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 - POSIX|alarm]] which would generate the [[SIGALRM]] [[POSIX signals|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 ==
 +
* [[Real-time clock]]
 +
* [[Sleep]]
 +
* [[Counter]]
 +
* [[Date and time]]
 +
 
  
 
[[Category:Counters]]
 
[[Category:Counters]]

Latest revision as of 10:43, 10 April 2014

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]

New text document.svg This section is empty; you can help add the missing info by editing this page.

Hardware timers[edit]

New text document.svg This section is empty; you can help add the missing info by editing this page.

Software timers[edit]

New text document.svg This section is empty; you can help add the missing info by editing this page.

Alternatives[edit]

New text document.svg This section is empty; you can help add the missing info by editing this page.

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]