mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 05:38:21 +00:00
xclock port: make it actually show the time
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
diff --git xclock-clean/Clock.c xclock-workdir/Clock.c
|
||||
index de6beb6..0e92cb6 100644
|
||||
index de6beb6..6d726ef 100644
|
||||
--- xclock-clean/Clock.c
|
||||
+++ xclock-workdir/Clock.c
|
||||
@@ -1281,6 +1281,8 @@ time_millis(struct tm *tm, struct timeval *tv)
|
||||
static unsigned long
|
||||
time_intervals(unsigned long millis, unsigned long interval)
|
||||
@@ -1292,7 +1292,7 @@ static void
|
||||
round_time(float _update, struct tm *tm, struct timeval *tv)
|
||||
{
|
||||
+ if(!interval)
|
||||
+ return millis;
|
||||
return (millis + interval / 2) / interval;
|
||||
}
|
||||
/* interval in milliseconds */
|
||||
- unsigned long update = (int) (_update * 1000.0 + 0.5);
|
||||
+ unsigned long update = roundf(_update * 1000.0 + 0.5);
|
||||
|
||||
/* compute milliseconds since midnight */
|
||||
unsigned long old_secs = time_seconds(tm);
|
||||
diff --git xclock-clean/configure.ac xclock-workdir/configure.ac
|
||||
index 7d9847b..e15fecd 100644
|
||||
--- xclock-clean/configure.ac
|
||||
|
||||
Reference in New Issue
Block a user