diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-08-24 16:07:50 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-08-24 16:07:50 +0200 |
commit | 1ae3aae35193dce25e5534b12a46011ec7912bb4 (patch) | |
tree | 85d452b2a9cc23f081de7b2f3054801d6d9ea554 /src/fastd.c | |
parent | 4c0623a080c77ed54fa9fec47c2ab982385cb9a9 (diff) | |
download | fastd-1ae3aae35193dce25e5534b12a46011ec7912bb4.tar fastd-1ae3aae35193dce25e5534b12a46011ec7912bb4.zip |
Use simple int64_t timestamps in ms instead of timespecs
Diffstat (limited to 'src/fastd.c')
-rw-r--r-- | src/fastd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fastd.c b/src/fastd.c index 247b390..8c58718 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -485,7 +485,7 @@ static inline void init(int argc, char *argv[]) { init_config(&status_fd); fastd_update_time(); - ctx.next_maintenance = fastd_in_seconds(MAINTENANCE_INTERVAL); + ctx.next_maintenance = ctx.now + MAINTENANCE_INTERVAL; ctx.unknown_handshakes[0].timeout = ctx.now; #ifdef WITH_DYNAMIC_PEERS @@ -544,13 +544,13 @@ static inline void init(int argc, char *argv[]) { /** Performs periodic maintenance tasks */ static inline void maintenance(void) { - if (!fastd_timed_out(&ctx.next_maintenance)) + if (!fastd_timed_out(ctx.next_maintenance)) return; fastd_socket_handle_binds(); fastd_peer_maintenance(); - ctx.next_maintenance.tv_sec += MAINTENANCE_INTERVAL; + ctx.next_maintenance += MAINTENANCE_INTERVAL; } /** Reaps zombies of asynchronous shell commands. */ |