Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
time.h File Reference
#include <_types/_time_t.h>
#include <stddef.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  timespec
 
struct  timeval
 
struct  tm
 

Macros

#define CLOCKS_PER_SEC   1000000L
 
#define TIME_UTC   1
 
#define _STRUCT_TIMESPEC
 
#define _STRUCT_TIMEVAL
 

Typedefs

typedef int clockid_t
 
typedef void * timer_t
 
typedef unsigned long clock_t
 
typedef unsigned useconds_t
 

Functions

char * asctime (const struct tm *)
 
clock_t clock (void)
 
time_t time (time_t *)
 
double difftime (time_t, time_t)
 
time_t mktime (struct tm *)
 
size_t strftime (char *__restrict, size_t, const char *__restrict, const struct tm *__restrict)
 
struct tmgmtime (const time_t *)
 
struct tmlocaltime (const time_t *)
 
char * ctime (const time_t *)
 
int timespec_get (struct timespec *, int)
 

Class Documentation

◆ timespec

struct timespec

Definition at line 28 of file time.h.

Collaboration diagram for timespec:
Collaboration graph
Class Members
long tv_nsec
time_t tv_sec

◆ timeval

struct timeval

Definition at line 35 of file time.h.

Collaboration diagram for timeval:
Collaboration graph
Class Members
time_t tv_sec
suseconds_t tv_usec

◆ tm

struct tm

Definition at line 41 of file time.h.

Collaboration diagram for tm:
Collaboration graph
Class Members
long __tm_gmtoff
char * __tm_zone
int tm_hour
int tm_isdst
int tm_mday
int tm_min
int tm_mon
int tm_sec
int tm_wday
int tm_yday
int tm_year

Macro Definition Documentation

◆ _STRUCT_TIMESPEC

#define _STRUCT_TIMESPEC

Definition at line 27 of file time.h.

◆ _STRUCT_TIMEVAL

#define _STRUCT_TIMEVAL

Definition at line 34 of file time.h.

◆ CLOCKS_PER_SEC

#define CLOCKS_PER_SEC   1000000L

Definition at line 13 of file time.h.

◆ TIME_UTC

#define TIME_UTC   1

Definition at line 15 of file time.h.

Typedef Documentation

◆ clock_t

typedef unsigned long clock_t

Definition at line 24 of file time.h.

◆ clockid_t

typedef int clockid_t

Definition at line 22 of file time.h.

◆ timer_t

typedef void* timer_t

Definition at line 23 of file time.h.

◆ useconds_t

typedef unsigned useconds_t

Definition at line 25 of file time.h.

Function Documentation

◆ asctime()

char* asctime ( const struct tm )

Definition at line 4 of file asctime.c.

5 {
6  static char buf[26];
7  return asctime_r(tm, buf);
8 }
Definition: time.h:41
char * asctime_r(const struct tm *restrict tm, char *restrict buf)
Definition: asctime_r.c:7

References asctime_r().

◆ clock()

clock_t clock ( void  )

◆ ctime()

char* ctime ( const time_t *  )

◆ difftime()

double difftime ( time_t  ,
time_t   
)

◆ gmtime()

struct tm* gmtime ( const time_t *  )

◆ localtime()

struct tm* localtime ( const time_t *  )

◆ mktime()

time_t mktime ( struct tm )

◆ strftime()

size_t strftime ( char *  __restrict,
size_t  ,
const char *  __restrict,
const struct tm __restrict 
)

◆ time()

time_t time ( time_t *  )

◆ timespec_get()

int timespec_get ( struct timespec ,
int   
)