summaryrefslogtreecommitdiff
path: root/toxcore/TCP_server.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/TCP_server.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/TCP_server.c')
-rw-r--r--toxcore/TCP_server.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/toxcore/TCP_server.c b/toxcore/TCP_server.c
index cc59d088..207a5107 100644
--- a/toxcore/TCP_server.c
+++ b/toxcore/TCP_server.c
@@ -1424,8 +1424,6 @@ static void do_TCP_epoll(TCP_Server *tcp_server)
1424 1424
1425void do_TCP_server(TCP_Server *tcp_server) 1425void do_TCP_server(TCP_Server *tcp_server)
1426{ 1426{
1427 unix_time_update();
1428
1429#ifdef TCP_SERVER_USE_EPOLL 1427#ifdef TCP_SERVER_USE_EPOLL
1430 do_TCP_epoll(tcp_server); 1428 do_TCP_epoll(tcp_server);
1431 1429