mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 14:29:05 -07:00
avoid an enet_time_get call when timeout expires
This commit is contained in:
parent
c58ec4cc44
commit
5721b667f2
1 changed files with 3 additions and 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 ();
|
||||
|
|
Loading…
Reference in a new issue