61#include <sysinfoapi.h> 
   63#define DELTA_EPOCH_IN_MICROSECS  11644473600000000Ui64 
   65int clock_gettime(
int clockid, 
struct timespec *tp)
 
   68   unsigned __int64 tmpres = 0;
 
   73   GetSystemTimeAsFileTime(&ft);
 
   75   tmpres |= ft.dwHighDateTime;
 
   77   tmpres |= ft.dwLowDateTime;
 
   81   tmpres -= DELTA_EPOCH_IN_MICROSECS;
 
   82   tp->tv_sec = (long)(tmpres / 1000000UL);
 
   83   tp->tv_nsec = (long)(tmpres % 1000000UL) * 1000;
 
   98  clock_gettime(CLOCK_REALTIME, &tp);
 
  101  st_time = *localtime(&tp.tv_sec);
 
  103  st_time = *localtime_r(&tp.tv_sec, &buf_time);
 
  106  strftime(pc_time,30,
"%d-%h-%y %T",&st_time);
 
  107  return ((
CHARS *) pc_time);
 
 
CHARS * f_ut_time(CHARS *pc_time)