xclock: Changes to 'master'
Keith Packard
keithp at kemper.freedesktop.org
Sun May 14 06:56:11 UTC 2017
Clock.c | 154 +++++++++++++++++++++++++++++++++++++++++++--------------------
ClockP.h | 3 -
2 files changed, 109 insertions(+), 48 deletions(-)
New commits:
commit 7ad730d892c899df3bb0b51a757ff2c55b6dc6d1
Author: Keith Packard <keithp at keithp.com>
Date: Sat May 13 23:48:55 2017 -0700
Allow sub-second updates.
Lets you run the clock at whatever tick rate you like.
Note that this changes the behaviour of the clock when the update
isn't a divisor of the number of seconds in a day. In the old code,
the time to display was an integer number of intervals from the start
of the year, in the new code, it is an integer number of intervals
from the start of the day.
I like that better as it makes the seconds consistent from day to day,
even if it means an uneven tick at local midnight. Given that I
suspect no-one has ever done this in practice, I doubt it really
matters.
At least the code is simpler now, while supporting updates at the
level of the Xt timers, which are milliseconds.
Signed-off-by: Keith Packard <keithp at keithp.com>
More information about the xorg-commit
mailing list