2010-11-26 21:50:36 +01:00
|
|
|
#ifndef __COMPAT_H__
|
|
|
|
#define __COMPAT_H__
|
|
|
|
|
|
|
|
#ifdef WIN32
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
static inline void sleep(int secs)
|
|
|
|
{
|
|
|
|
Sleep(secs * 1000);
|
|
|
|
}
|
|
|
|
|
2010-11-26 22:28:12 +01:00
|
|
|
enum {
|
|
|
|
PRIO_PROCESS = 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline int setpriority(int which, int who, int prio)
|
|
|
|
{
|
2012-01-17 00:38:06 +01:00
|
|
|
return -!SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
2010-11-26 22:28:12 +01:00
|
|
|
}
|
|
|
|
|
2010-11-26 21:50:36 +01:00
|
|
|
#endif /* WIN32 */
|
|
|
|
|
|
|
|
#endif /* __COMPAT_H__ */
|