]> mj.ucw.cz Git - libucw.git/commitdiff
Main: Use get_timestamp() for main_now
authorMartin Mares <mj@ucw.cz>
Sat, 11 Feb 2012 19:32:22 +0000 (20:32 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 11 Feb 2012 19:32:22 +0000 (20:32 +0100)
ucw/mainloop.c

index e81e26eb4b4a0a03d6e4e13a3549ff0c4451a4fd..6eb60d47da74a73fa48813e5f26c6074f5c86e77 100644 (file)
@@ -50,10 +50,7 @@ static void signal_del_ctx(struct main_context *m, struct main_signal *ms);
 static void
 main_get_time_ctx(struct main_context *m)
 {
-  struct timeval tv;
-  gettimeofday(&tv, NULL);
-  m->now_seconds = tv.tv_sec;
-  m->now = (timestamp_t)tv.tv_sec * 1000 + tv.tv_usec / 1000;
+  m->now = get_timestamp();
 }
 
 static struct main_context *