29 #include <coil/TimeValue.h> 33 #define EPOCHFILETIME (116444736000000000i64) 60 inline unsigned int sleep(
unsigned int seconds)
63 ::Sleep( seconds *1000 );
101 iret = ::WSAStartup(ver,&wsa);
108 ssoc = ::socket(AF_INET,
111 if(ssoc==INVALID_SOCKET){
112 iret = ::WSAGetLastError();
123 tv.tv_sec = interval.
sec();
124 tv.tv_usec = interval.
usec();
125 iret = ::select((
int)ssoc+1, &mask, NULL, NULL, &tv);
126 if( iret == SOCKET_ERROR )
128 iret = ::WSAGetLastError();
176 iret = ::WSAStartup(ver,&wsa);
183 ssoc = ::socket(AF_INET,SOCK_STREAM,0);
184 if(ssoc==INVALID_SOCKET){
185 iret = ::WSAGetLastError();
192 tv.tv_sec = usec / 1000000;
193 tv.tv_usec = usec % 1000000;
194 iret = ::select((
int)ssoc+1, &mask, NULL, NULL, &tv);
195 if( iret == SOCKET_ERROR )
197 iret = ::WSAGetLastError();
243 ::GetSystemTimeAsFileTime(&ftime);
244 lint.LowPart = ftime.dwLowDateTime;
245 lint.HighPart = ftime.dwHighDateTime;
246 val64 = lint.QuadPart;
249 tv->tv_sec = (long)(val64 / 1000000);
250 tv->tv_usec = (long)(val64 % 1000000);
260 ::_get_timezone(&tzone);
263 ::_get_daylight(&dlight);
333 val64 = (tv->tv_sec + bias * 60) * 1000000;
334 val64 = val64 + tv->tv_usec;
335 lint.QuadPart = val64;
336 ftime.dwHighDateTime = lint.LowPart;
337 ftime.dwHighDateTime = lint.HighPart;
338 ::FileTimeToSystemTime(&ftime, &systime);
339 ::SetSystemTime(&systime);
348 #endif // COIL_TIME_H
long int sec() const
Get value of second time scale.
unsigned int sleep(unsigned int seconds)
Stop a processing at specified second time.
int gettimeofday(struct timeval *tv, struct timezone *tz)
Get the time and timezone.
int settimeofday(const struct timeval *tv, const struct timezone *tz)
Set the time and timezone.
long int usec() const
Get value of micro second time scale.
int usleep(useconds_t usec)
Stop a processing at specified micro second time.
Common Object Interface Layer.