blob: e2f736c79f111afff9d9f9c4999a5b3c02e5e071 [file] [log] [blame] [raw]
#include "stat.h"
#include <time.h>
#include <errno.h>
#include <windows.h>
int clock_gettime(unsigned long int clock_id, struct timespec *tp) {
unsigned long int t;
switch(clock_id) {
case 1:
//t = timeGetTime(); // _WCE 4.2
t = GetTickCount();
tp->tv_sec = t / 1000;
tp->tv_nsec = (t - tp->tv_sec * 1000) * 1000000;
return 0;
default:
errno = EINVAL;
return -1;
}
}