]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/mainloop.c
Conf: Decoupled cf_stack_done() from committing
[libucw.git] / ucw / mainloop.c
index e81e26eb4b4a0a03d6e4e13a3549ff0c4451a4fd..b2b07c5082476bedbdc023e094f49f6feb02a28b 100644 (file)
@@ -9,12 +9,13 @@
 
 #undef LOCAL_DEBUG
 
-#include "ucw/lib.h"
-#include "ucw/heap.h"
-#include "ucw/mainloop.h"
-#include "ucw/threads.h"
-#include "ucw/gary.h"
-#include "ucw/process.h"
+#include <ucw/lib.h>
+#include <ucw/heap.h>
+#include <ucw/mainloop.h>
+#include <ucw/threads.h>
+#include <ucw/gary.h>
+#include <ucw/process.h>
+#include <ucw/time.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -50,10 +51,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 *