PatchworkOS
Loading...
Searching...
No Matches
time.h File Reference
#include <stdint.h>
#include "_internal/NULL.h"
#include "_internal/clock_t.h"
#include "_internal/config.h"
#include "_internal/size_t.h"
#include "_internal/time_t.h"
#include "_internal/timespec.h"

Go to the source code of this file.

Data Structures

struct  tm
 

Macros

#define TIME_UTC   1
 

Functions

_PUBLIC clock_t clock (void)
 
_PUBLIC double difftime (time_t time1, time_t time0)
 
_PUBLIC time_t mktime (struct tm *timeptr)
 
_PUBLIC time_t time (time_t *timer)
 
_PUBLIC int timespec_get (struct timespec *ts, int base)
 
_PUBLIC char * asctime (const struct tm *timeptr)
 
_PUBLIC char * ctime (const time_t *timer)
 
_PUBLIC struct tmgmtime (const time_t *timer)
 
_PUBLIC struct tmlocaltime (const time_t *timer)
 
_PUBLIC struct tmlocaltime_r (const time_t *timer, struct tm *buf)
 
_PUBLIC size_t strftime (char *_RESTRICT s, size_t maxsize, const char *_RESTRICT format, const struct tm *_RESTRICT timeptr)
 

Macro Definition Documentation

◆ TIME_UTC

#define TIME_UTC   1

Definition at line 18 of file time.h.

Function Documentation

◆ asctime()

_PUBLIC char * asctime ( const struct tm timeptr)

◆ clock()

_PUBLIC clock_t clock ( void  )

Definition at line 5 of file clock.c.

References _clock_get().

Referenced by benchmark_mmap().

◆ ctime()

_PUBLIC char * ctime ( const time_t timer)

◆ difftime()

_PUBLIC double difftime ( time_t  time1,
time_t  time0 
)

◆ gmtime()

_PUBLIC struct tm * gmtime ( const time_t timer)

◆ localtime()

_PUBLIC struct tm * localtime ( const time_t timer)

Definition at line 5 of file localtime.c.

References localtime_r().

Referenced by procedure().

◆ localtime_r()

◆ mktime()

◆ strftime()

_PUBLIC size_t strftime ( char *_RESTRICT  s,
size_t  maxsize,
const char *_RESTRICT  format,
const struct tm *_RESTRICT  timeptr 
)

◆ time()

_PUBLIC time_t time ( time_t timer)

Definition at line 5 of file time.c.

References _syscall_unix_epoch(), NULL, and time().

Referenced by dwm_poll(), procedure(), rtc_read(), taskbar_update_clock(), time(), timer_init(), and timer_uptime().

◆ timespec_get()

_PUBLIC int timespec_get ( struct timespec ts,
int  base 
)