Skip to content

Time

Main menu key: t

Four sub-modes: Uptime, Clock, Countdown, Stopwatch. The app is always full-screen (no header); the mode name flashes briefly in the top-left when you switch.

Screenshots

Uptime / Clock / Countdown / Stopwatch

time-uptimetime-clocktime-countdowntime-stopwatch

Large clock / Help / Countdown finished

time-bigtime-helptime-up

Shortcuts

Mode switch (Help summary)

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

Uptime

KeyAction
hHelp

Clock

KeyAction
rNTP sync (needs WiFi)
bToggle large dot-matrix clock (HH:MM only)
hHelp

Countdown · SETUP

KeyAction
Arrow keysAdjust h/m/s fields
09Digit input
BtnGOStart
hHelp

Countdown · running / paused

KeyAction
BtnGOPause / resume
rReset
hHelp

Stopwatch

KeyAction
BtnGOStart / pause / resume
rReset
hHelp

Usage

  1. Default mode comes from config time.default (e.g. up); timezone is time.timezone (e.g. CST-8).
  2. Clock uses RTC; with network, r does NTP.
  3. On Clock, b enters Big Clock (HH:MM dot-matrix only, no seconds).
  4. Countdown / Stopwatch keep timing after leaving the Time App or switching sub-modes — see below.

Power saving (clock display)

Time does not auto-blank the screen, dim the backlight, or enter ESP light / deep sleep. Long-running clock display saves power by slowing the main loop; for real sleep use the main-menu Sleep app.

Where it applies

ScenarioIdle slow loop?
Uptime / Clock (including Big Clock)Yes — after ~1 minute with no activity
Help openNo — keeps a faster poll
NTP sync in progressNo — stays ~30ms poll for timeouts / reconnect
Countdown / StopwatchNo — need higher refresh; not idle-throttled

Idle slow loop (~1 s tick)

After 60s with no keys / mode switches (TIME_IDLE_SLOW_MS):

  • Main-loop delay aligns to the next whole second (~1 s tick); keys respond within about 1 s.
  • updateRtcApp poll goes from ~30ms to 1000ms.
  • Normal Clock / Uptime UI still refreshes every 1 s so the seconds digit does not skip.

While active (Uptime / Clock): main loop ~30ms to avoid busy-spin power waste while staying responsive.

Any key or mode switch inside Time resets the idle timer; Help open blocks the slow loop.

Big Clock redraw

StateRedraw check intervalNotes
Active~15sHH:MM only — no need to redraw every second
Idle slow loop~1sMinute flips stay timely

vs Sleep

CapabilityTime clock displaySleep
Slower CPU polling✓ ~1 s when idle
Screen off / backlight 0✓ when entering sleep
ESP light / deep sleep

Good desk-clock setup: stay on Uptime or Clock (optional b large digits); after ~1 minute the loop slows automatically. Use Sleep when you want deeper power saving.

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).

Sparks for M5Stack Cardputer