]> git.meshlink.io Git - meshlink/blobdiff - src/net_setup.c
Avoid calling time(NULL).
[meshlink] / src / net_setup.c
index a4fd3a4beffc8b8c710145db94fd4b4357f33e2b..488cb7c649c44bf81d9ff456cfba173a4f69a215 100644 (file)
@@ -751,7 +751,7 @@ static bool setup_myself(void) {
        myself->nexthop = myself;
        myself->via = myself;
        myself->status.reachable = true;
-       myself->last_state_change = time(NULL);
+       myself->last_state_change = now.tv_sec;
        myself->status.sptps = experimental;
        node_add(myself);
 
@@ -958,7 +958,7 @@ static bool setup_myself(void) {
                return false;
        }
 
-       last_config_check = time(NULL);
+       last_config_check = now.tv_sec;
 
        return true;
 }