mas-bandwidth / netcode

Secure client/server connections over UDP
BSD 3-Clause "New" or "Revised" License
2.43k stars 190 forks source link

Change implementation of netcode_sleep on linux and mac #96

Closed Mokosha closed 4 years ago

Mokosha commented 4 years ago

usleep has been deprecated for a while now on POSIX systems. From the usleep man page:

4.3BSD, POSIX.1-2001. POSIX.1-2001 declares this function obsolete; use nanosleep(2) instead. POSIX.1-2008 removes the specification of usleep().

This PR replaces it with nanosleep.