A timer is a specialized type of clock used for measuring specific time intervals. Timers can be categorized into two main types. A timer which counts upwards from zero for measuring elapsed time is often called a stopwatch, while a device which counts down from a specified time interval is more usually called a timer. A simple example of this type is an hourglass. Working method timers have two main groups: Hardware and Software timers.
Most timers give an indication that the time interval that had been set has expired.
Time switches, timing mechanisms which activate a switch, are sometimes also called "timers".
Electronic timers are essentially quartz clocks with special electronics, and can achieve higher precision than mechanical timers. Electronic timers have digital electronics, but may have an analog or digital display. Integrated circuits have made digital logic so inexpensive that an electronic timer is now less expensive than many mechanical and electromechanical timers. Individual timers are implemented as a simple single-chip computer system, similar to a watch and usually using the same, mass-produced, technology.
Many timers are now implemented in software. Modern controllers use a programmable logic controller (PLC) rather than a box full of electromechanical parts. The logic is usually designed as if it were relays, using a special computer language called ladder logic. In PLCs, timers are usually simulated by the software built into the controller. Each timer is just an entry in a table maintained by the software.