Skip to content

feat: support periodic application timer events - #8

Open
jadehawk wants to merge 1 commit into
Free-Ink:masterfrom
jadehawk:feat/application-timers
Open

jadehawk wants to merge 1 commit into
Free-Ink:masterfrom
jadehawk:feat/application-timers

Conversation

@jadehawk

@jadehawk jadehawk commented Nov 27, 2026 •

Copy link
Copy Markdown

Why this matters to users

Consider a clock that only changes when a button is pressed, or a pairing screen that asks the reader to keep pressing Check Pairing after approving a code on a phone. Neither should require the user to interact just to notice that something has changed.

In a real pairing workflow, the remote service could accept the code while the e-reader was still waiting for input. An experimental five-second wake event allowed the application to check for approval without a key press. Testing also exposed an important e-paper detail: a wake should not automatically trigger a panel refresh when nothing has changed.

A generic opt-in timer gives applications a way to update when necessary without busy polling, fake key events or unnecessary redraws. The host decides when to schedule wakes, and the application decides whether its visible content actually needs updating. The hardware scheduler is outside this SDK PR.

Summary

Provide an opt-in periodic wake event for applications such as clocks, calendars and progress displays without busy polling or adding background tasks to the runtime.

  • Add timer_set (proposed syscall 109) and DSN_EV_TIMER.
  • Accept intervals of 1–3600 seconds, or zero to disable.
  • The host explicitly enables scheduler support, owns monotonic deadlines and marks an elapsed timer before stepping the guest.
  • Deliver a wake only while waiting for input; real input wins and missed ticks are not queued.
  • Reset the interval on app load. Hosts without a scheduler return UNAVAILABLE.

Validation

The full upstream make test suite passed with the pinned FreeInk SDK. The new guest/host test exercises unsupported hosts, invalid intervals, input priority, periodic wake delivery, interval changes, disable and reload. This change does not add a desktop or firmware scheduler; those integrations are host responsibilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant