Zephyr Project API 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
posix_time.h File Reference
#include <stddef.h>
#include <zephyr/sys/clock.h>
#include <zephyr/toolchain.h>

Go to the source code of this file.

Data Structures

struct  timespec
 
struct  itimerspec
 

Macros

#define CLOCK_REALTIME   ((clockid_t)SYS_CLOCK_REALTIME)
 
#define CLOCKS_PER_SEC   CONFIG_SYS_CLOCK_TICKS_PER_SEC
 
#define CLOCK_PROCESS_CPUTIME_ID   ((clockid_t)2)
 
#define CLOCK_THREAD_CPUTIME_ID   ((clockid_t)3)
 
#define CLOCK_MONOTONIC   ((clockid_t)SYS_CLOCK_MONOTONIC)
 
#define TIMER_ABSTIME   SYS_TIMER_ABSTIME
 

Typedefs

typedef unsigned long clockid_t
 
typedef unsigned long timer_t
 
typedef void * locale_t
 
typedef int pid_t
 

Functions

char * asctime_r (const struct tm *ZRESTRICT tm, char *ZRESTRICT buf)
 
int clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
 
int clock_getres (clockid_t clock_id, struct timespec *ts)
 
int clock_gettime (clockid_t clock_id, struct timespec *ts)
 
int clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp)
 
int clock_settime (clockid_t clock_id, const struct timespec *ts)
 
char * ctime_r (const time_t *clock, char *buf)
 
struct tmgetdate (const char *string)
 
struct tmgmtime_r (const time_t *ZRESTRICT timer, struct tm *ZRESTRICT result)
 
struct tmlocaltime_r (const time_t *ZRESTRICT timer, struct tm *ZRESTRICT result)
 
int nanosleep (const struct timespec *rqtp, struct timespec *rmtp)
 
size_t strftime_l (char *ZRESTRICT s, size_t maxsize, const char *ZRESTRICT format, const struct tm *ZRESTRICT timeptr, locale_t locale)
 
char * strptime (const char *ZRESTRICT s, const char *ZRESTRICT format, struct tm *ZRESTRICT tm)
 
int timer_create (clockid_t clockId, struct sigevent *ZRESTRICT evp, timer_t *ZRESTRICT timerid)
 
int timer_delete (timer_t timerid)
 
int timer_getoverrun (timer_t timerid)
 
int timer_gettime (timer_t timerid, struct itimerspec *its)
 
int timer_settime (timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue)
 

Variables

int daylight
 
long timezone
 
char * tzname []
 

Macro Definition Documentation

◆ CLOCK_MONOTONIC

#define CLOCK_MONOTONIC   ((clockid_t)SYS_CLOCK_MONOTONIC)

◆ CLOCK_PROCESS_CPUTIME_ID

#define CLOCK_PROCESS_CPUTIME_ID   ((clockid_t)2)

◆ CLOCK_REALTIME

#define CLOCK_REALTIME   ((clockid_t)SYS_CLOCK_REALTIME)

◆ CLOCK_THREAD_CPUTIME_ID

#define CLOCK_THREAD_CPUTIME_ID   ((clockid_t)3)

◆ CLOCKS_PER_SEC

#define CLOCKS_PER_SEC   CONFIG_SYS_CLOCK_TICKS_PER_SEC

◆ TIMER_ABSTIME

#define TIMER_ABSTIME   SYS_TIMER_ABSTIME

Typedef Documentation

◆ clockid_t

typedef unsigned long clockid_t

◆ locale_t

typedef void* locale_t

◆ pid_t

typedef int pid_t

◆ timer_t

typedef unsigned long timer_t

Function Documentation

◆ asctime_r()

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

◆ clock_getcpuclockid()

int clock_getcpuclockid ( pid_t  pid,
clockid_t clock_id 
)

◆ clock_getres()

int clock_getres ( clockid_t  clock_id,
struct timespec ts 
)

◆ clock_gettime()

int clock_gettime ( clockid_t  clock_id,
struct timespec ts 
)

◆ clock_nanosleep()

int clock_nanosleep ( clockid_t  clock_id,
int  flags,
const struct timespec rqtp,
struct timespec rmtp 
)

◆ clock_settime()

int clock_settime ( clockid_t  clock_id,
const struct timespec ts 
)

◆ ctime_r()

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

◆ getdate()

struct tm * getdate ( const char *  string)

◆ gmtime_r()

struct tm * gmtime_r ( const time_t *ZRESTRICT  timer,
struct tm *ZRESTRICT  result 
)

◆ localtime_r()

struct tm * localtime_r ( const time_t *ZRESTRICT  timer,
struct tm *ZRESTRICT  result 
)

◆ nanosleep()

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

◆ strftime_l()

size_t strftime_l ( char *ZRESTRICT  s,
size_t  maxsize,
const char *ZRESTRICT  format,
const struct tm *ZRESTRICT  timeptr,
locale_t  locale 
)

◆ strptime()

char * strptime ( const char *ZRESTRICT  s,
const char *ZRESTRICT  format,
struct tm *ZRESTRICT  tm 
)

◆ timer_create()

int timer_create ( clockid_t  clockId,
struct sigevent *ZRESTRICT  evp,
timer_t *ZRESTRICT  timerid 
)

◆ timer_delete()

int timer_delete ( timer_t  timerid)

◆ timer_getoverrun()

int timer_getoverrun ( timer_t  timerid)

◆ timer_gettime()

int timer_gettime ( timer_t  timerid,
struct itimerspec its 
)

◆ timer_settime()

int timer_settime ( timer_t  timerid,
int  flags,
const struct itimerspec value,
struct itimerspec ovalue 
)

Variable Documentation

◆ daylight

int daylight
extern

◆ timezone

long timezone
extern

◆ tzname

char* tzname[]
extern