summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-08-09 23:53:39 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-08-16 21:01:38 +0000
commit54066f338f185f2fbd6694d9a4877f42cbfa21c8 (patch)
treee056e50af1009bf373c040812e46cd1de8de9979 /toxcore/Messenger.c
parent31ea1aa06e59d24d5196b17be9a7105d85c25080 (diff)
Reduce the number of times `unix_time_update` is called.
Reduced by, e.g.: * `file_transfer_test`: 33% of the `clock_gettime` calls. * `tox_many_test`: 53% of the `clock_gettime` calls. Other tests will see similar improvements. Real world applications will be closer to 40-50% improvement, since tox_many_test has 100 nodes, while file_transfer_test has 2 nodes.
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r--toxcore/Messenger.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index acf9f806..ab341e61 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -2603,8 +2603,6 @@ void do_messenger(Messenger *m, void *userdata)
2603 } 2603 }
2604 } 2604 }
2605 2605
2606 unix_time_update();
2607
2608 if (!m->options.udp_disabled) { 2606 if (!m->options.udp_disabled) {
2609 networking_poll(m->net, userdata); 2607 networking_poll(m->net, userdata);
2610 do_dht(m->dht); 2608 do_dht(m->dht);