Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
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 <ctime>
Include dependency graph for wtime.cpp:

Functions

static u64 u64_from_FILETIME (const FILETIME *ft)
 
time_t wtime_utc_filetime_to_time_t (FILETIME *ft)
 
static size_t MsFromTimespec (const 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)
 

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 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

◆ first_day()

static int first_day ( int  year)
static

◆ is_leap_year()

static int is_leap_year ( int  year)
static

◆ match_string()

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

◆ MsFromTimespec()

static size_t MsFromTimespec ( const timespec &  ts)
static

◆ nanosleep()

int nanosleep ( const struct timespec *  rqtp,
struct timespec *  rmtp 
)

◆ set_week_number_mon()

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

◆ set_week_number_mon4()

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

◆ set_week_number_sun()

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

◆ sleep()

unsigned sleep ( unsigned  sec)

◆ strptime()

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

◆ u64_from_FILETIME()

static u64 u64_from_FILETIME ( const FILETIME *  ft)
static

◆ usleep()

int usleep ( useconds_t  us)

◆ wtime_utc_filetime_to_time_t()

time_t wtime_utc_filetime_to_time_t ( FILETIME *  ft)

Variable Documentation

◆ _1e3

const long _1e3 = 1000
static

◆ _1e6

const long _1e6 = 1000000
static

◆ _1e7

const long _1e7 = 10000000
static

◆ _1e9

const i64 _1e9 = 1000000000
static

◆ abb_month

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

◆ abb_weekdays

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

◆ ampm

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

◆ full_month

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

◆ full_weekdays

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

◆ posix_epoch_hns

const u64 posix_epoch_hns = 0x019DB1DED53E8000
static

◆ tm_year_base

const int tm_year_base = 1900