Created
March 25, 2016 02:32
-
-
Save luoyetx/6b86f8b2732eca09177f to your computer and use it in GitHub Desktop.
cross platform sleep function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef WIN32 | |
#include <windows.h> | |
#define JDA_SLEEP(ms) Sleep(ms) | |
#else | |
#include <unistd.h> | |
#define JDA_SLEEP(ms) usleep(ms) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment