| Samsung Internal API reference 2.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Functions
time.h File Reference

Time header. More...

Go to the source code of this file.

## Data Structures
struct | tm

## Macros
#define | NUM_SECONDS_IN_MIN (60)
#define | NUM_MILLIS_IN_SEC (1000)
#define | NUM_NANOS_IN_USEC (1000)
#define | NUM_NANOS_IN_MILLI (1000000L)
#define | NUM_NANOS_IN_SEC (1000000000ULL)

## Functions
int | nanosleep (const struct timespec *req, struct timespec *rem)
| nanosleep() suspends the execution of the calling thread until either at least the time specified in `*req` has elapsed, or the delivery of a signal that triggers the invocation of a handler in the calling thread or that terminates the process. If the call is interrupted by a signal handler, nanosleep() returns -1, sets errno to EINTR, and writes the remaining time into the structure pointed to by rem unless rem is NULL. The value of `*req` can then be used to call nanosleep() again and complete the specified pause. More...
int | clock_gettime (clockid_t clk_id, struct timespec *ts)
| The function retrieves the time of the specified clock `clk_id`. This function is non-blocking, except CLOCK_REE case. In this case function can sleep and can be interrupted with -1 result and EINTR errno. More...
time_t | time (time_t *time)
| Get the current calendar time as a value of type time_t. More...
unsigned int | arm_timer_get_frequency (void)
| The function retrieves the frequency of ARM timer. More...
void | timeadd (const struct timespec *a, const struct timespec *b, struct timespec *res)
| The function adds two dates. More...
void | timesub (const struct timespec *a, const struct timespec *b, struct timespec *res)
| The function subtracts two dates. More...
int64_t | timespec_to_ms (const struct timespec *a)
| The function converts time from timespec format to milliseconds. More...
uint64_t | timespec_to_nsec (const struct timespec *a)
| The function converts time from timespec format to nanoseconds. More...
void | ms_to_timespec (int64_t t, struct timespec *a)
| The function converts time in milliseconds to to timespec format. More...

## Detailed Description

Time header.

Copyright
  (C) 2012-2019, Samsung Electronics Co., Ltd.