Skip to content

Time

Main menu key: t

Four sub-modes: Uptime, Clock, Countdown, Stopwatch; supports Pure display (hides tip / extra UI).

Screenshots

Uptime / Clock / Countdown / Stopwatch

time-uptimetime-clocktime-countdowntime-stopwatch

Pure display

time-uptime-puretime-clock-puretime-countdown-puretime-stopwatch-pure

Shortcuts

Mode switch (Help summary)

KeyAction
uUptime
tClock
cCountdown
sStopwatch
pPure display toggle
rSync time / reset (depends on mode)
BtnGOStart / pause / resume
hHelp

Uptime

KeyAction
pPure
hHelp

Clock

KeyAction
rNTP sync (needs WiFi)
pPure
hHelp

Countdown · SETUP

KeyAction
Arrow keysAdjust h/m/s fields
09Digit input
BtnGOStart
p / hPure / Help

Countdown · running / paused

KeyAction
BtnGOPause / resume
rReset
p / hPure / Help

Stopwatch

KeyAction
BtnGOStart / pause / resume
rReset
p / hPure / Help

Usage

  1. Default mode comes from config time.default (e.g. up); time.pure can enable Pure by default.
  2. Clock uses RTC; with network, r does NTP. Timezone is timezone in config (e.g. CST-8).
  3. Pure works well as a desk clock / stopwatch.
  4. Countdown / Stopwatch keep timing after leaving the Time App or switching sub-modes — see below.

Background running

Uptime and Clock only refresh while Time is foreground; Countdown and Stopwatch state lives in memory and is not cleared when switching sub-modes or returning to the main menu.

Countdown

ScenarioBehavior
Running, switch to Clock / Uptime, etc.Keeps timing; returning to Countdown shows remaining time
Running, back to main menu or another AppKeeps timing; main loop pollCountdownBackground detects expiry
Expires while not on Countdown pageAuto-enters Time App Countdown end page
Expiry alarmBeep-beep-pause loop, up to 30s; rings even off CD page (volume from sound.volume)
Stop alarmOn end page, x cancels and returns to setup; or r reset

While PAUSED, remaining ms are saved; resume recomputes end time from millis(). Leaving the App does not call leaveCountdownApp to stop — only expiry, reset, or cancel alarm ends it.

Stopwatch

ScenarioBehavior
Running, switch sub-mode / main menuswRunning and elapsed stay; continues from millis()
Re-enter StopwatchShows correct elapsed (including time away)
Foreground refreshWhile running, ~30ms refresh, display to 1ms
ResetDouble-beep r clears

No global expiry popup for stopwatch; screen does not refresh while away, but time still advances.

Sub-mode switch

Within Time, u / t / c / s keep Countdown and Stopwatch running state (enterCountdownApp / enterStopwatchApp only redraw; they do not reset phase).

Pure mode

Pure hides header / bottom tip; Countdown end page still keeps the cancel hint. Background timing and alarm logic match non-Pure.

Sparks for M5Stack Cardputer