Skip to content

Introduce libclock / Port applets

This is intended to replace the datetime engine and make it much much easier for 3rd party clocks. All code is better documented and avoids JS related timezone issues being done in the applet.

Digital clock code can definitely be cleaned up further, but it's got rid of a lot of hacks.


Designed as a simpler replacement to the datetime engine, with some key differences to the internals.

  • Tracking of the system timezone is handled internally and mostly abstracted, the caller gets information about the effective timezone regardless of whether it's the system or defined. This means we don't need to worry about using UTC and adding offsets in QML code.

  • We use absolute timers throughout; we're using timerfd for clock skew notifications anyway, we may as well use this to align timers on the minute. Rather than try and use one timer to align another timer

  • Backend timers are shared, front-end Clock classes are designed to be thin wrappers which we can make multiple instances of with effectively no cost.


Mid to long term: We'll also move existing C++ classes from Digital Clock to this library.

Edited by David Edmundson

Merge request reports

Loading