cpuminer/compat.h

25 lines
352 B
C
Raw Normal View History

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)
{
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__ */