summaryrefslogtreecommitdiffstats
path: root/src/poll.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-24 16:07:50 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-24 16:07:50 +0200
commit1ae3aae35193dce25e5534b12a46011ec7912bb4 (patch)
tree85d452b2a9cc23f081de7b2f3054801d6d9ea554 /src/poll.c
parent4c0623a080c77ed54fa9fec47c2ab982385cb9a9 (diff)
downloadfastd-1ae3aae35193dce25e5534b12a46011ec7912bb4.tar
fastd-1ae3aae35193dce25e5534b12a46011ec7912bb4.zip
Use simple int64_t timestamps in ms instead of timespecs
Diffstat (limited to 'src/poll.c')
-rw-r--r--src/poll.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/poll.c b/src/poll.c
index 3f94379..cee827b 100644
--- a/src/poll.c
+++ b/src/poll.c
@@ -57,7 +57,7 @@ static inline int handshake_timeout(void) {
fastd_peer_t *peer = container_of(ctx.handshake_queue.next, fastd_peer_t, handshake_entry);
- int diff_msec = timespec_diff(&peer->next_handshake, &ctx.now);
+ int diff_msec = peer->next_handshake - ctx.now;
if (diff_msec < 0)
return 0;
else
@@ -129,7 +129,7 @@ void fastd_poll_delete_peer(size_t i UNUSED) {
void fastd_poll_handle(void) {
- int maintenance_timeout = timespec_diff(&ctx.next_maintenance, &ctx.now);
+ int maintenance_timeout = ctx.next_maintenance - ctx.now;
if (maintenance_timeout < 0)
maintenance_timeout = 0;
@@ -244,7 +244,7 @@ void fastd_poll_delete_peer(size_t i) {
void fastd_poll_handle(void) {
size_t i;
- int maintenance_timeout = timespec_diff(&ctx.next_maintenance, &ctx.now);
+ int maintenance_timeout = ctx.next_maintenance - ctx.now;
if (maintenance_timeout < 0)
maintenance_timeout = 0;