make clock tick EXACTLy ON every second... :)

SVN revision: 12351
This commit is contained in:
Carsten Haitzler 2004-12-04 09:31:22 +00:00
parent 0d6917d923
commit 3a094efbe7
1 changed files with 4 additions and 1 deletions

View File

@ -4418,9 +4418,9 @@ collections {
new Float:second; new Float:second;
new v; new v;
timer(1.0, "clock_cb", 1);
date(year, month, day, yearday, weekday, hour, minute, second); date(year, month, day, yearday, weekday, hour, minute, second);
v = round(second); v = round(second);
timer(1.0 - (second - v), "clock_cb", 1);
buf[0] = 0; buf[0] = 0;
if (v < 10) {snprintf(buf, 10, "0%i", v);} if (v < 10) {snprintf(buf, 10, "0%i", v);}
else {snprintf(buf, 10, "%i", v);} else {snprintf(buf, 10, "%i", v);}
@ -4457,6 +4457,7 @@ collections {
mouse_events: 0; mouse_events: 0;
description { description {
state: "default" 0.0; state: "default" 0.0;
aspect: 1.0 1.0;
rel1 { rel1 {
relative: 0.1 0.1; relative: 0.1 0.1;
} }
@ -4548,6 +4549,7 @@ collections {
mouse_events: 0; mouse_events: 0;
description { description {
state: "default" 0.0; state: "default" 0.0;
aspect: 1.0 1.0;
rel1 { rel1 {
relative: 0.1 0.1; relative: 0.1 0.1;
} }
@ -4639,6 +4641,7 @@ collections {
mouse_events: 0; mouse_events: 0;
description { description {
state: "default" 0.0; state: "default" 0.0;
aspect: 1.0 1.0;
rel1 { rel1 {
relative: 0.2 0.2; relative: 0.2 0.2;
} }