VSF Documented
Data Structures | Macros | Functions | Variables
vsf_linux_glibc_time.c File Reference
#include "../../vsf_linux_cfg.h"
#include "../../include/unistd.h"
#include "../../include/sys/time.h"
#include "../../include/simple_libc/time.h"

Data Structures

struct  vsf_linux_glibc_time_t
 

Macros

#define __VSF_LINUX_CLASS_INHERIT__
 
#define SECONDS_PER_DAY   (24 * 60 * 60)
 
#define SECONDS_PER_YEAR   (365 * SECONDS_PER_DAY)
 
#define SECONDS_PER_4YEARS   ((4 * 365 + 1) * SECONDS_PER_DAY)
 
#define IS_LEAP_YEAR(__Y)   ((!((__Y) % 4) && ((__Y) % 100)) || !(((__Y) + 1900) % 400))
 
#define LEAP_YEARS_SINCE(__Y)   ((((__Y) - 1) / 4) - (((__Y) - 1) / 100) + (((__Y) + 299) / 400) - 17)
 

Functions

vsf_systimer_tick_t vsf_linux_timespec2tick (const struct timespec *ts)
 
void vsf_linux_tick2timespec (struct timespec *ts, vsf_systimer_tick_t tick)
 
time_t mktime (struct tm *tm)
 
time_t time (time_t *t)
 
void tzset (void)
 
size_t strftime (char *str, size_t maxsize, const char *format, const struct tm *tm)
 
char * strptime (const char *str, const char *format, struct tm *tm)
 
char * asctime_r (const struct tm *tm, char *buf)
 
char * asctime (const struct tm *tm)
 
char * ctime (const time_t *t)
 
char * ctime_r (const time_t *t, char *buf)
 
struct tmgmtime_r (const time_t *timep, struct tm *result)
 
struct tmgmtime (const time_t *timep)
 
struct tmlocaltime_r (const time_t *timep, struct tm *result)
 
struct tmlocaltime (const time_t *timep)
 
int nanosleep (const struct timespec *requested_time, struct timespec *remaining)
 
clock_t clock (void)
 
int clock_getres (clockid_t clockid, struct timespec *res)
 
int clock_gettime (clockid_t clockid, struct timespec *tp)
 
int clock_settime (clockid_t clockid, const struct timespec *ts)
 
int clock_nanosleep (clockid_t clockid, int flags, const struct timespec *request, struct timespec *remain)
 
int setitimer (int which, const struct itimerval *new_value, struct itimerval *old_value)
 
int getitimer (int which, struct itimerval *curr_value)
 
int timer_create (clockid_t clockid, struct sigevent *sevp, timer_t *timerid)
 
int timer_settime (timer_t timerid, int flags, const struct itimerspec *new_value, struct itimerspec *old_value)
 
int timer_gettime (timer_t timerid, struct itimerspec *curr_value)
 
int timer_delete (timer_t timerid)
 
int timer_getoverrun (timer_t timerid)
 
int timespec_get (struct timespec *ts, int base)
 

Variables

char * tzname [2] = { "GMT", "GMT" }
 
long timezong = 0L
 
int daylight = 0
 
struct vsf_linux_glibc_time_t __vsf_linux_glibc_time
 
__VSF_VPLT_DECORATOR__ vsf_linux_libc_time_vplt_t vsf_linux_libc_time_vplt
 

Macro Definition Documentation

◆ __VSF_LINUX_CLASS_INHERIT__

#define __VSF_LINUX_CLASS_INHERIT__

◆ SECONDS_PER_DAY

#define SECONDS_PER_DAY   (24 * 60 * 60)

◆ SECONDS_PER_YEAR

#define SECONDS_PER_YEAR   (365 * SECONDS_PER_DAY)

◆ SECONDS_PER_4YEARS

#define SECONDS_PER_4YEARS   ((4 * 365 + 1) * SECONDS_PER_DAY)

◆ IS_LEAP_YEAR

#define IS_LEAP_YEAR (   __Y)    ((!((__Y) % 4) && ((__Y) % 100)) || !(((__Y) + 1900) % 400))

◆ LEAP_YEARS_SINCE

#define LEAP_YEARS_SINCE (   __Y)    ((((__Y) - 1) / 4) - (((__Y) - 1) / 100) + (((__Y) + 299) / 400) - 17)

Function Documentation

◆ vsf_linux_timespec2tick()

vsf_systimer_tick_t vsf_linux_timespec2tick ( const struct timespec ts)

◆ vsf_linux_tick2timespec()

void vsf_linux_tick2timespec ( struct timespec ts,
vsf_systimer_tick_t  tick 
)

◆ mktime()

time_t mktime ( struct tm tm)

◆ time()

time_t time ( time_t t)

◆ tzset()

void tzset ( void  )

◆ strftime()

size_t strftime ( char *  str,
size_t  maxsize,
const char *  format,
const struct tm tm 
)

◆ strptime()

char * strptime ( const char *  str,
const char *  format,
struct tm tm 
)

◆ asctime_r()

char * asctime_r ( const struct tm tm,
char *  buf 
)

◆ asctime()

char * asctime ( const struct tm tm)

◆ ctime()

char * ctime ( const time_t t)

◆ ctime_r()

char * ctime_r ( const time_t t,
char *  buf 
)

◆ gmtime_r()

struct tm * gmtime_r ( const time_t timep,
struct tm result 
)

◆ gmtime()

struct tm * gmtime ( const time_t timep)

◆ localtime_r()

struct tm * localtime_r ( const time_t timep,
struct tm result 
)

◆ localtime()

struct tm * localtime ( const time_t timep)

◆ nanosleep()

int nanosleep ( const struct timespec requested_time,
struct timespec remaining 
)

◆ clock()

clock_t clock ( void  )

◆ clock_getres()

int clock_getres ( clockid_t  clockid,
struct timespec res 
)

◆ clock_gettime()

int clock_gettime ( clockid_t  clockid,
struct timespec tp 
)

◆ clock_settime()

int clock_settime ( clockid_t  clockid,
const struct timespec ts 
)

◆ clock_nanosleep()

int clock_nanosleep ( clockid_t  clockid,
int  flags,
const struct timespec request,
struct timespec remain 
)

◆ setitimer()

int setitimer ( int  which,
const struct itimerval new_value,
struct itimerval old_value 
)

◆ getitimer()

int getitimer ( int  which,
struct itimerval curr_value 
)

◆ timer_create()

int timer_create ( clockid_t  clockid,
struct sigevent sevp,
timer_t timerid 
)

◆ timer_settime()

int timer_settime ( timer_t  timerid,
int  flags,
const struct itimerspec new_value,
struct itimerspec old_value 
)

◆ timer_gettime()

int timer_gettime ( timer_t  timerid,
struct itimerspec curr_value 
)

◆ timer_delete()

int timer_delete ( timer_t  timerid)

◆ timer_getoverrun()

int timer_getoverrun ( timer_t  timerid)

◆ timespec_get()

int timespec_get ( struct timespec ts,
int  base 
)

Variable Documentation

◆ tzname

char* tzname[2] = { "GMT", "GMT" }

◆ timezong

long timezong = 0L

◆ daylight

int daylight = 0

◆ __vsf_linux_glibc_time

struct vsf_linux_glibc_time_t __vsf_linux_glibc_time

◆ vsf_linux_libc_time_vplt

Initial value:
= {
}
#define clock_nanosleep
Definition time.h:36
double difftime(time_t time1, time_t time2)
#define clock_getres
Definition time.h:35
#define timer_getoverrun
Definition time.h:41
#define clock_gettime
Definition time.h:33
#define clock_settime
Definition time.h:34
#define timer_create
Definition time.h:37
#define nanosleep
Definition time.h:42
#define timer_delete
Definition time.h:40
#define timer_settime
Definition time.h:38
#define timer_gettime
Definition time.h:39
#define strftime
Definition time.h:45
#define strptime
Definition time.h:46
#define timespec_get
Definition time.h:44
Definition time.h:90
#define VSF_APPLET_VPLT_ENTRY_FUNC(__NAME)
Definition vsf_cfg.h:182
#define VSF_APPLET_VPLT_INFO(__TYPE, __MAJOR, __MINOR, __FINAL)
Definition vsf_cfg.h:146
char * asctime_r(const struct tm *tm, char *buf)
Definition vsf_linux_glibc_time.c:266
struct tm * localtime(const time_t *timep)
Definition vsf_linux_glibc_time.c:348
struct tm * gmtime(const time_t *timep)
Definition vsf_linux_glibc_time.c:338
void tzset(void)
Definition vsf_linux_glibc_time.c:99
char * ctime(const time_t *t)
Definition vsf_linux_glibc_time.c:278
char * ctime_r(const time_t *t, char *buf)
Definition vsf_linux_glibc_time.c:283
struct tm * gmtime_r(const time_t *timep, struct tm *result)
Definition vsf_linux_glibc_time.c:288
struct tm * localtime_r(const time_t *timep, struct tm *result)
Definition vsf_linux_glibc_time.c:343
clock_t clock(void)
Definition vsf_linux_glibc_time.c:364
time_t time(time_t *t)
Definition vsf_linux_glibc_time.c:89
char * asctime(const struct tm *tm)
Definition vsf_linux_glibc_time.c:271
time_t mktime(struct tm *tm)
Definition vsf_linux_glibc_time.c:70