24 #define MIN_HSYNC_PER_SEC (240*50)
25 #define MIN_HSYNC_DELAY 100
26 #define MAX_PS2CLOCK_PER_HSYNC (PS2_CLOCKS_PER_SEC/MIN_HSYNC_PER_SEC)
39 return (pts->tv_sec * 1000000ULL) + (pts->tv_nsec / 1000ULL);
50 int nanosleep(
const struct timespec *req,
struct timespec *rem)
79 else if (clock_real_end > clock_end) {
98 unsigned int sleep(
unsigned int seconds)
s32 CreateSema(ee_sema_t *sema)
s32 DeleteSema(s32 sema_id)
s32 iSignalSema(s32 sema_id)
s32 WaitSema(s32 sema_id)
s32 SetAlarm(u16 time, void(*callback)(s32 alarm_id, u16 time, void *common), void *common)
#define PS2_CLOCKS_PER_MSEC
ps2_clock_t ps2_clock(void)
int nanosleep(const struct timespec *req, struct timespec *rem)
unsigned int sleep(unsigned int seconds)
static ps2_clock_t us_to_ps2_clock(u64 us)
static ps2_clock_t timespec_to_ps2_clock(const struct timespec *pts)
static u64 timespec_to_us(const struct timespec *pts)
static void _sleep_waker(s32 alarm_id, u16 time, void *arg2)
static unsigned int iPS2ClockPerHSync
#define MAX_PS2CLOCK_PER_HSYNC