.TH "time.h" 3teegris "Sun Oct 28 2018" "Version 2.0" "Samsung Internal API reference" \" -*- nroff -*-
.ad l
.nh
.SH NAME
time.h \- Time header\&.  

.SH SYNOPSIS
.br
.PP
.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBtm\fP"
.br
.in -1c
.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBNUM_SECONDS_IN_MIN\fP   (60)"
.br
.ti -1c
.RI "#define \fBNUM_MILLIS_IN_SEC\fP   (1000)"
.br
.ti -1c
.RI "#define \fBNUM_NANOS_IN_USEC\fP   (1000)"
.br
.ti -1c
.RI "#define \fBNUM_NANOS_IN_MILLI\fP   (1000000L)"
.br
.ti -1c
.RI "#define \fBNUM_NANOS_IN_SEC\fP   (1000000000ULL)"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBnanosleep\fP (struct timespec *req, struct timespec *rem)"
.br
.RI "\fI\fBnanosleep()\fP suspends the execution of the calling thread until either at least the time specified in \fC*req\fP 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, \fBnanosleep()\fP returns -1, sets \fBerrno\fP to \fBEINTR\fP, and writes the remaining time into the structure pointed to by rem unless rem is NULL\&. The value of \fC*req\fP can then be used to call \fBnanosleep()\fP again and complete the specified pause\&. \fP"
.ti -1c
.RI "int \fBclock_gettime\fP (clockid_t clk_id, struct timespec *ts)"
.br
.RI "\fIThe function retrieves the time of the specified clock \fCclk_id\fP\&. 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\&. \fP"
.ti -1c
.RI "\fBtime_t\fP \fBtime\fP (\fBtime_t\fP *time)"
.br
.RI "\fIGet the current calendar time as a value of type \fBtime_t\fP\&. \fP"
.ti -1c
.RI "int \fBalarm\fP (unsigned int seconds)"
.br
.RI "\fISet the real-time timer to expire in \fCseconds\fP seconds\&. \fP"
.ti -1c
.RI "int \fBsetitimer\fP (int which, const struct itimerval *new_value, struct itimerval *old_value)"
.br
.RI "\fISet value of an interval timer\&. \fP"
.ti -1c
.RI "int \fBgetitimer\fP (int which, struct itimerval *curr_value)"
.br
.RI "\fIGet value of an interval timer\&. \fP"
.ti -1c
.RI "unsigned int \fBarm_timer_get_frequency\fP (void)"
.br
.RI "\fIThe function retrieves the frequency of ARM timer\&. \fP"
.ti -1c
.RI "void \fBtimeadd\fP (const struct timespec *a, const struct timespec *b, struct timespec *res)"
.br
.RI "\fIThe function adds two dates\&. \fP"
.ti -1c
.RI "void \fBtimesub\fP (const struct timespec *a, const struct timespec *b, struct timespec *res)"
.br
.RI "\fIThe function subtracts two dates\&. \fP"
.ti -1c
.RI "int64_t \fBtimespec_to_ms\fP (const struct timespec *a)"
.br
.RI "\fIThe function converts time from timespec format to milliseconds\&. \fP"
.ti -1c
.RI "uint64_t \fBtimespec_to_nsec\fP (const struct timespec *a)"
.br
.RI "\fIThe function converts time from timespec format to nanoseconds\&. \fP"
.ti -1c
.RI "void \fBms_to_timespec\fP (int64_t t, struct timespec *a)"
.br
.RI "\fIThe function converts time in milliseconds to to timespec format\&. \fP"
.in -1c
.SH "Detailed Description"
.PP 
Time header\&. 


.PP
\fBCopyright:\fP
.RS 4
(C) 2013 - 2018, Samsung Electronics Co\&., Ltd\&. 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for Samsung Internal API reference from the source code\&.
