For a clock time, not a length of time
A timer counts down a length, such as 25 minutes; an alarm waits for a clock time, such as 15:30. When a call starts at half past three, typing 15:30 is safer than working out how many minutes are left from now. The time box opens filled with the time ten minutes from now, so a quick reminder needs only one change.
- Joining a video call or a webinar at a fixed time while you work at the computer
- Remembering a delivery slot or the end of a parking session while you are absorbed in something else
- Setting the end of a study block on a laptop while your phone is in another room
- Naming it, such as "3 pm supplier call", so you know what it is for the moment it rings
Times that have passed, and the current minute
The time you enter is set to second zero of that minute today. If that moment has already gone, the alarm moves to the same time tomorrow, which is why 07:00 set at 23:50 rings the next morning.
The case that catches people out is the current minute. Set 14:00 at 14:00:20 and second zero has already passed, so it rings at 14:00 tomorrow, not now. The face shows the weekday, the time and the countdown, so a glance at the weekday right after setting it confirms the day you meant.
Once set, the alarm is stored as a single absolute moment. If you then fly somewhere and the device switches time zone, it still rings at that same moment; only the time shown on the face changes to the new zone. To ring at a local time, set it again after the zone has changed.
How it rings on time in a background tab
Browsers may run timers late in tabs you are not looking at, and the WHATWG HTML standard explicitly lets a timer wait a further implementation-defined time. So the moment you set the alarm, its first minute of sound is booked ahead on the audio hardware clock (the Web Audio AudioContext): a pair of tones at 880 Hz and 1175 Hz, 50 times, 1.2 seconds apart.
The page itself checks the clock every half second. When the time arrives it cancels the booked sound and takes over, repeating the same pair every 1.2 seconds until you stop it.
The three volume settings are gain values of 0.08 (soft), 0.2 (normal) and 0.6 (loud). Loud is three times normal, chosen to carry to another room; with headphones on, soft is plenty.
Reopening the page, and snoozing
- The time, name and volume of a set alarm are kept in this browser on this device. If you reopen the page after that time has passed, the alarm is dropped rather than ringing late.
- Browsers will not start audio until the person presses something, which the Web Audio specification describes as a context being allowed to start. That is why a reopened alarm shows its own Turn on sound button.
- A snooze counts from the moment you press it, not from the original time: an alarm that rang at 07:00 and is snoozed for five minutes at 07:02 rings again at 07:07.
- Permission for notifications is asked once, when you first set an alarm, and a notification is shown only when the tab is hidden.
Keeping the screen on has gaps too
While the alarm waits, the page asks for a screen wake lock. Under the W3C specification the browser releases that lock when the tab is hidden, and it may limit it depending on battery state. The tool asks again when the tab becomes visible, but while you are in another app or tab a phone can go to sleep as usual, and a sleeping device plays nothing, booked sound included.
There are no repeating weekdays, no second alarm and no way to ring past the device volume or silent mode. For waking up or taking medicine, use the clock app built into your phone or computer; this page is for reminders while you are sitting at the screen.