2010-11-26 21:50:36 +01:00
|
|
|
#ifndef __COMPAT_H__
|
|
|
|
#define __COMPAT_H__
|
|
|
|
|
|
|
|
#ifdef WIN32
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
2013-10-05 00:37:40 +02:00
|
|
|
#define sleep(secs) Sleep((secs) * 1000)
|
2010-11-26 21:50:36 +01:00
|
|
|
|
2010-11-26 22:28:12 +01:00
|
|
|
enum {
|
|
|
|
PRIO_PROCESS = 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline int setpriority(int which, int who, int prio)
|
|
|
|
{
|
2012-06-07 00:22:23 +02:00
|
|
|
return -!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_IDLE);
|
2010-11-26 22:28:12 +01:00
|
|
|
}
|
|
|
|
|
2010-11-26 21:50:36 +01:00
|
|
|
#endif /* WIN32 */
|
|
|
|
|
|
|
|
#endif /* __COMPAT_H__ */
|