Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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"

Go to the source code of this file.

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 
)

Definition at line 131 of file wtime.cpp.

int clock_gettime ( clockid_t  clock,
struct timespec ts 
)

Definition at line 121 of file wtime.cpp.

static i64 CurrentSystemTime_ns ( )
static

Definition at line 96 of file wtime.cpp.

static int first_day ( int  year)
static

Definition at line 311 of file wtime.cpp.

static int is_leap_year ( int  year)
static

Definition at line 301 of file wtime.cpp.

static void LatchInitialSystemTime ( )
static

Definition at line 86 of file wtime.cpp.

static int match_string ( const char **  buf,
const char **  strs 
)
static

Definition at line 276 of file wtime.cpp.

static size_t MsFromTimespec ( const timespec ts)
static

Definition at line 110 of file wtime.cpp.

int nanosleep ( const struct timespec rqtp,
struct timespec  
)

Definition at line 142 of file wtime.cpp.

static void set_week_number_mon ( struct tm *  timeptr,
int  wnum 
)
static

Definition at line 341 of file wtime.cpp.

static void set_week_number_mon4 ( struct tm *  timeptr,
int  wnum 
)
static

Definition at line 357 of file wtime.cpp.

static void set_week_number_sun ( struct tm *  timeptr,
int  wnum 
)
static

Definition at line 325 of file wtime.cpp.

unsigned sleep ( unsigned  sec)

Definition at line 151 of file wtime.cpp.

char* strptime ( const char *  buf,
const char *  format,
struct tm *  timeptr 
)

Definition at line 377 of file wtime.cpp.

static timespec TimespecFromNs ( i64  ns)
static

Definition at line 102 of file wtime.cpp.

static u64 u64_from_FILETIME ( const FILETIME *  ft)
static

Definition at line 58 of file wtime.cpp.

int usleep ( useconds_t  us)

Definition at line 164 of file wtime.cpp.

WINIT_REGISTER_MAIN_INIT ( wtime_Init  )
static Status wtime_Init ( )
static

Definition at line 618 of file wtime.cpp.

time_t wtime_utc_filetime_to_time_t ( FILETIME *  ft)

Definition at line 71 of file wtime.cpp.

Variable Documentation

const long _1e3 = 1000
static

Definition at line 42 of file wtime.cpp.

const long _1e6 = 1000000
static

Definition at line 43 of file wtime.cpp.

const long _1e7 = 10000000
static

Definition at line 44 of file wtime.cpp.

const i64 _1e9 = 1000000000
static

Definition at line 45 of file wtime.cpp.

const char* abb_month[]
static
Initial value:
= {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
NULL
}

Definition at line 232 of file wtime.cpp.

const char* abb_weekdays[]
static
Initial value:
= {
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
NULL
}

Definition at line 210 of file wtime.cpp.

const char* ampm[]
static
Initial value:
= {
"am",
"pm",
NULL
}

Definition at line 264 of file wtime.cpp.

const char* full_month[]
static
Initial value:
= {
"January",
"February",
"Mars",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
NULL,
}

Definition at line 248 of file wtime.cpp.

const char* full_weekdays[]
static
Initial value:
= {
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
NULL
}

Definition at line 221 of file wtime.cpp.

const u64 posix_epoch_hns = 0x019DB1DED53E8000
static

Definition at line 53 of file wtime.cpp.

i64 stInitial_ns
static

Definition at line 84 of file wtime.cpp.

const int tm_year_base = 1900

Definition at line 294 of file wtime.cpp.