Skip to content

Instantly share code, notes, and snippets.

@TheKingOfAtlantis
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save TheKingOfAtlantis/4bb59f43b86cbfa82c4f to your computer and use it in GitHub Desktop.

Select an option

Save TheKingOfAtlantis/4bb59f43b86cbfa82c4f to your computer and use it in GitHub Desktop.
Gives a more OS consistent sleep/delay function
#include "Zleep.h"
#include <Windows.h>
void zleep(unsigned int period) {
#if defined(_WIN32)
sleep(period)
#elif defined(__unix__)
sleep(period/1000);
#endif
}
#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