- // update clock to force update (-time_precision)
- struct timeval stv;
- gettimeofday(&stv, 0);
- time_clock.tv_sec = stv.tv_sec - time_precision;
- time_clock.tv_sec -= time_clock.tv_sec % time_precision;
+
+void init_clock()
+{
+ if(time1_format && clock_timeout==0) {
+ if (strchr(time1_format, 'S') || strchr(time1_format, 'T') || strchr(time1_format, 'r'))
+ clock_timeout = add_timeout(10, 1000, update_clocks);
+ else
+ clock_timeout = add_timeout(10, 60000, update_clocks);
+ }