Use signal-based timekeeping functions throughout the source base.
[openvswitch] / secchan / secchan.c
index 30531988a8108c971eb27a12e43031f096ebfc42..e4fc62f66c03ceba20b9c50ff272dd5609cae295 100644 (file)
@@ -61,6 +61,7 @@
 #include "packets.h"
 #include "poll-loop.h"
 #include "rconn.h"
+#include "timeval.h"
 #include "util.h"
 #include "vconn-ssl.h"
 #include "vconn.h"
@@ -165,6 +166,7 @@ main(int argc, char *argv[])
 
     set_program_name(argv[0]);
     register_fault_handlers();
+    time_init();
     vlog_init();
     parse_options(argc, argv, &s);
 
@@ -460,7 +462,7 @@ get_controller_mac(struct netdev *netdev, struct rconn *controller)
 
     uint32_t last_ip = ip;
 
-    time_t now = time(0);
+    time_t now = time_now();
 
     ip = rconn_get_ip(controller);
     if (last_ip != ip || !next_refresh || now >= next_refresh) {