Last active
August 29, 2015 14:04
-
-
Save TheKingOfAtlantis/4bb59f43b86cbfa82c4f to your computer and use it in GitHub Desktop.
Gives a more OS consistent sleep/delay function
This file contains hidden or 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
| #include "Zleep.h" | |
| #include <Windows.h> | |
| void zleep(unsigned int period) { | |
| #if defined(_WIN32) | |
| sleep(period) | |
| #elif defined(__unix__) | |
| sleep(period/1000); | |
| #endif | |
| } |
This file contains hidden or 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
| #pragma once | |
| inline void zleep(unsigned int period); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment