- // 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) {
+ if (strchr(time1_format, 'S') || strchr(time1_format, 'T') || strchr(time1_format, 'r'))
+ install_timer(0, 1000000, 1, 0, update_clocks);
+ else install_timer(0, 1000000, 60, 0, update_clocks);
+ }