Pyrogenesis  trunk
Functions | Variables
wtime.cpp File Reference
#include "precompiled.h"
#include "lib/sysdep/os/win/wposix/wtime.h"
#include "lib/sysdep/os/win/wposix/wposix_internal.h"
#include "lib/sysdep/os/win/whrt/whrt.h"
Include dependency graph for wtime.cpp:

Functions

 WINIT_REGISTER_MAIN_INIT (wtime_Init)
 
static u64 u64_from_FILETIME (const FILETIME *ft)
 
time_t wtime_utc_filetime_to_time_t (FILETIME *ft)
 
static void LatchInitialSystemTime ()
 
static i64 CurrentSystemTime_ns ()
 
static timespec TimespecFromNs (i64 ns)
 
static size_t MsFromTimespec (const timespec &ts)
 
int clock_gettime (clockid_t clock, struct timespec *ts)
 
int clock_getres (clockid_t clock, struct timespec *ts)
 
int nanosleep (const struct timespec *rqtp, struct timespec *)
 
unsigned sleep (unsigned sec)
 
int usleep (useconds_t us)
 
static int match_string (const char **buf, const char **strs)
 
static int is_leap_year (int year)
 
static int first_day (int year)
 
static void set_week_number_sun (struct tm *timeptr, int wnum)
 
static void set_week_number_mon (struct tm *timeptr, int wnum)
 
static void set_week_number_mon4 (struct tm *timeptr, int wnum)
 
char * strptime (const char *buf, const char *format, struct tm *timeptr)
 
static Status wtime_Init ()
 

Variables

static const long _1e3 = 1000
 
static const long _1e6 = 1000000
 
static const long _1e7 = 10000000
 
static const i64 _1e9 = 1000000000
 
static const u64 posix_epoch_hns = 0x019DB1DED53E8000
 
static i64 stInitial_ns
 
static const char * abb_weekdays []
 
static const char * full_weekdays []
 
static const char * abb_month []
 
static const char * full_month []
 
static const char * ampm []
 
const int tm_year_base = 1900
 

Function Documentation

int clock_getres ( clockid_t  clock,
struct timespec ts 
)
int clock_gettime ( clockid_t  clock,
struct timespec ts 
)
static i64 CurrentSystemTime_ns ( )
static
static int first_day ( int  year)
static
static int is_leap_year ( int  year)
static
static void LatchInitialSystemTime ( )
static
static int match_string ( const char **  buf,
const char **  strs 
)
static
static size_t MsFromTimespec ( const timespec ts)
static
int nanosleep ( const struct timespec rqtp,
struct timespec  
)
static void set_week_number_mon ( struct tm *  timeptr,
int  wnum 
)
static
static void set_week_number_mon4 ( struct tm *  timeptr,
int  wnum 
)
static
static void set_week_number_sun ( struct tm *  timeptr,
int  wnum 
)
static
unsigned sleep ( unsigned  sec)
char* strptime ( const char *  buf,
const char *  format,
struct tm *  timeptr 
)
static timespec TimespecFromNs ( i64  ns)
static
static u64 u64_from_FILETIME ( const FILETIME *  ft)
static
int usleep ( useconds_t  us)
WINIT_REGISTER_MAIN_INIT ( wtime_Init  )
static Status wtime_Init ( )
static
time_t wtime_utc_filetime_to_time_t ( FILETIME *  ft)

Variable Documentation

const long _1e3 = 1000
static
const long _1e6 = 1000000
static
const long _1e7 = 10000000
static
const i64 _1e9 = 1000000000
static
const char* abb_month[]
static
Initial value:
= {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
NULL
}
const char* abb_weekdays[]
static
Initial value:
= {
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
NULL
}
const char* ampm[]
static
Initial value:
= {
"am",
"pm",
NULL
}
const char* full_month[]
static
Initial value:
= {
"January",
"February",
"Mars",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
NULL,
}
const char* full_weekdays[]
static
Initial value:
= {
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
NULL
}
const u64 posix_epoch_hns = 0x019DB1DED53E8000
static
i64 stInitial_ns
static
const int tm_year_base = 1900