diff options
author | lsalzman <[email protected]> | 2014-02-21 11:20:20 +0200 |
---|---|---|
committer | lsalzman <[email protected]> | 2014-02-21 11:20:20 +0200 |
commit | 5721b667f2d57d1c8b65ef5575379f6756ec2938 (patch) | |
tree | 214bd3f00ccdf3a1dc92077ab196ba18ce9cf973 | |
parent | c58ec4cc448ccdc933d53241ce14a61a020140c7 (diff) | |
download | enet-5721b667f2d57d1c8b65ef5575379f6756ec2938.tar.gz enet-5721b667f2d57d1c8b65ef5575379f6756ec2938.zip |
avoid an enet_time_get call when timeout expires
-rw-r--r-- | protocol.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1904,6 +1904,9 @@ enet_host_service (ENetHost * host, ENetEvent * event, enet_uint32 timeout) } } + if (ENET_TIME_GREATER_EQUAL (host -> serviceTime, timeout)) + return 0; + do { host -> serviceTime = enet_time_get (); |