e0dc6649e1
- Test the whole hash instead of just looking at the high 32 bits - Set idle priority on Windows - Fix parameters -u and -p, and add short options -o and -O - Fix example JSON configuration file
24 lines
352 B
C
24 lines
352 B
C
#ifndef __COMPAT_H__
|
|
#define __COMPAT_H__
|
|
|
|
#ifdef WIN32
|
|
|
|
#include <windows.h>
|
|
|
|
static inline void sleep(int secs)
|
|
{
|
|
Sleep(secs * 1000);
|
|
}
|
|
|
|
enum {
|
|
PRIO_PROCESS = 0,
|
|
};
|
|
|
|
static inline int setpriority(int which, int who, int prio)
|
|
{
|
|
return -!SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
|
}
|
|
|
|
#endif /* WIN32 */
|
|
|
|
#endif /* __COMPAT_H__ */
|