56 struct timespec mrqtp;
57 mrqtp.tv_sec = iTimeVal;
60 return nanosleep(&mrqtp, NULL);
62 return sleep(iTimeVal);
74 struct timespec mrqtp;
75 mrqtp.tv_sec = iTimeVal/1000000;
76 mrqtp.tv_nsec = (iTimeVal - (mrqtp.tv_sec * 1000000)) * 1000;
78 return nanosleep(&mrqtp, NULL);
81 tv.tv_sec = iTimeVal/1000000;
82 tv.tv_usec = iTimeVal - (tv.tv_sec * 1000000);
83 return select(0, NULL, NULL, NULL, &tv);
103 iRandNum = ((rand()+0.0)/RAND_MAX * (fEnd - fStart)) + fStart;
117 tz.tz_minuteswest = 0;
119 if (gettimeofday(&tv, &tz) == 0)
124 myseed = (long) time(NULL);
INTERNAL void SYS_InitRandom(void)
Initialize the random generator.
INTERNAL int SYS_RandomInt(int fStart, int fEnd)
Generate a pseudo random number.
This handles abstract system level calls.
INTERNAL int SYS_Sleep(int iTimeVal)
Makes the current process sleep for some seconds.
INTERNAL int SYS_USleep(int iTimeVal)
Makes the current process sleep for some microseconds.