XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
time.h File Reference
#include <stddef.h>
#include <stdint.h>
Include dependency graph for time.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tm
 
struct  timespec
 
struct  timeval
 

Macros

#define CLOCKS_PER_SEC   1000L
 
#define CLOCK_REALTIME   0
 
#define CLOCK_MONOTONIC   1
 
#define CLOCK_PROCESS_CPUTIME_ID   2
 
#define CLOCK_THREAD_CPUTIME_ID   3
 

Typedefs

typedef long clock_t
 
typedef long time_t
 
typedef struct timeval timeval
 

Functions

struct tm * gmtime (const time_t *t)
 
struct tm * localtime (const time_t *t)
 
struct tm * gmtime_r (const time_t *t, struct tm *out)
 
struct tm * localtime_r (const time_t *t, struct tm *out)
 
time_t mktime (struct tm *tm)
 
time_t time (time_t *t)
 
char * ctime (const time_t *t)
 
clock_t clock (void)
 
double difftime (time_t a, time_t b)
 
int gettimeofday (struct timeval *tv, void *tz)
 
int nanosleep (const struct timespec *req, struct timespec *rem)
 

Macro Definition Documentation

◆ CLOCK_MONOTONIC

#define CLOCK_MONOTONIC   1

◆ CLOCK_PROCESS_CPUTIME_ID

#define CLOCK_PROCESS_CPUTIME_ID   2

◆ CLOCK_REALTIME

#define CLOCK_REALTIME   0

◆ CLOCK_THREAD_CPUTIME_ID

#define CLOCK_THREAD_CPUTIME_ID   3

◆ CLOCKS_PER_SEC

#define CLOCKS_PER_SEC   1000L

time.h shim for the QuickJS port on XenevaOS.

XEClib's real time.h skips struct tags (typedef-only), lacks tm_gmtoff / tm_zone, and declares gettimeofday as (timeval*). quickjs.c needs classic <time.h> interfaces, so the QuickJS port build resolves <time.h> to this header. localtime/gmtime are implemented in port/port.c; the rest stay XEClib's.

Typedef Documentation

◆ clock_t

typedef long clock_t

◆ time_t

typedef long time_t

◆ timeval

typedef struct timeval timeval

Function Documentation

◆ clock()

clock_t clock ( void  )

◆ ctime()

char * ctime ( const time_t *  t)

◆ difftime()

double difftime ( time_t  a,
time_t  b 
)

◆ gettimeofday()

int gettimeofday ( struct timeval *  tv,
void *  tz 
)

◆ gmtime()

struct tm * gmtime ( const time_t *  t)

◆ gmtime_r()

struct tm * gmtime_r ( const time_t *  t,
struct tm *  out 
)

◆ localtime()

struct tm * localtime ( const time_t *  t)

◆ localtime_r()

struct tm * localtime_r ( const time_t *  t,
struct tm *  out 
)

◆ mktime()

time_t mktime ( struct tm *  tm)

◆ nanosleep()

int nanosleep ( const struct timespec *  req,
struct timespec *  rem 
)

◆ time()

time_t time ( time_t *  t)