]> git.meshlink.io Git - meshlink/blobdiff - src/protocol_misc.c
Avoid calling time(NULL).
[meshlink] / src / protocol_misc.c
index 7617091e5eac3711c505e2d84ce0d150ca0b3966..a4ad73d6531c12a31d6a552e906efd812c8d800f 100644 (file)
@@ -89,7 +89,7 @@ bool termreq_h(connection_t *c, const char *request) {
 
 bool send_ping(connection_t *c) {
        c->status.pinged = true;
-       c->last_ping_time = time(NULL);
+       c->last_ping_time = now.tv_sec;
 
        return send_request(c, "%d", PING);
 }