61 #ifndef __INCLUDE_TIME_H 62 #define __INCLUDE_TIME_H 68 #include <tinyara/config.h> 70 #include <sys/types.h> 90 #ifdef CONFIG_USEC_PER_TICK 91 #define CLK_TCK (1000000/CONFIG_USEC_PER_TICK) 92 #define CLOCKS_PER_SEC (1000000/CONFIG_USEC_PER_TICK) 95 #define CLOCKS_PER_SEC (100) 109 #define CLOCK_REALTIME 0 116 #ifdef CONFIG_CLOCK_MONOTONIC 117 #define CLOCK_MONOTONIC 1 122 #define TIMER_ABSTIME 1 124 #ifndef CONFIG_LIBC_LOCALTIME 132 #define localtime(c) gmtime(c) 138 #define localtime_r(c, r) gmtime_r(c, r) 142 #define TM_YEAR_BASE 1900 188 #if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED) 213 #ifdef CONFIG_LIBC_LOCALTIME 218 extern char *tznames[2];
226 #if defined(__cplusplus) 227 #define EXTERN extern "C" 230 #define EXTERN extern 296 #ifdef CONFIG_LIBC_LOCALTIME 322 size_t strftime(
char *s,
size_t max, FAR
const char *format, FAR
const struct tm *
tm);
328 #if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED) 332 FAR
char *asctime(FAR
const struct tm *tp);
336 FAR
char *asctime_r(FAR
const struct tm *tp, FAR
char *buf);
340 FAR
char *ctime(FAR
const time_t *timep);
344 FAR
char *ctime_r(FAR
const time_t *timep, FAR
char *buf);
357 char *
strptime(
const char *buf,
const char *fmt,
struct tm *
tm);
366 #ifdef CONFIG_HAVE_DOUBLE 421 int timer_getoverrun(
timer_t timerid);
450 #ifdef CONFIG_LIBC_LOCALTIME 457 #if defined(__cplusplus) clock_t clock(void)
returns the implementation's best approximation to the processor time used by the process since the b...
FAR struct tm * gmtime_r(FAR const time_t *timer, FAR struct tm *result)
convert a time value to a broken-down UTC time
double difftime(time_t time1, time_t time0)
calculate time difference
int timer_settime(timer_t timerid, int flags, FAR const struct itimerspec *value, FAR struct itimerspec *ovalue)
per-process timers
int clock_getres(clockid_t clockid, FAR struct timespec *res)
clock and timer functions
int clock_gettime(clockid_t clockid, FAR struct timespec *tp)
clock and timer functions
Structure for elements that define a queue signal. The following is used to attach a signal to a mess...
#define localtime(c)
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
time_t time(FAR time_t *tloc)
get time
char * strptime(const char *buf, const char *fmt, struct tm *tm)
convert a time string to a time tm structure
int timer_delete(timer_t timerid)
delete a per-process timer
int nanosleep(FAR const struct timespec *rqtp, FAR struct timespec *rmtp)
high-resolution sleep
structure represents an elapsed time
Struct itimerspec is used to define settings for an interval timer.
time_t mktime(FAR struct tm *tp)
convert broken-down time into time since the Epoch
int timer_gettime(timer_t timerid, FAR struct itimerspec *value)
per-process timers
size_t strftime(char *s, size_t max, FAR const char *format, FAR const struct tm *tm)
convert date and time to a string
int clock_settime(clockid_t clockid, FAR const struct timespec *tp)
clock and timer functions
Structure containing a calendar date and time.
structure represents an elapsed time
FAR struct tm * gmtime(FAR const time_t *timer)
convert a time value to a broken-down UTC time
int timer_create(clockid_t clockid, FAR struct sigevent *evp, FAR timer_t *timerid)
create a per-process timer
#define localtime_r(c, r)
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)