#include "sofia-sip/su_types.h"
Include dependency graph for su_time.h:

Go to the source code of this file.
Data Structures | |
| struct | su_time_s |
| Time in seconds and microsecondcs. More... | |
Defines | |
| #define | SU_NTP_C(x) |
| Represent NTP constant. | |
| #define | SU_TIME_CMP(t1, t2) |
| Compare two timestamps. | |
| #define | SU_TIME_EPOCH |
| Seconds from 1.1.1900 to 1.1.1970. | |
Typedefs | |
| typedef su_time_s | su_time_t |
| Time in seconds and microsecondcs. | |
| typedef long | su_duration_t |
| Time difference in microseconds. | |
| typedef uint64_t | su_ntp_t |
| NTP timestamp. | |
Enumerations | |
| enum | { SU_DURATION_MAX } |
Functions | |
| su_nanotime_t | su_nanotime (su_nanotime_t *return_time) |
| Get current time as nanoseconds since epoch. | |
| su_nanotime_t | su_monotime (su_nanotime_t *return_time) |
| Get current time as nanoseconds. | |
| su_time_t | su_now (void) |
| Get current time. | |
| void | su_time (su_time_t *tv) |
| Get current time. | |
| long | su_time_cmp (su_time_t const t1, su_time_t const t2) |
| Compare two timestamps. | |
| double | su_time_diff (su_time_t const t1, su_time_t const t2) |
| Difference between two timestamps. | |
| su_duration_t | su_duration (su_time_t const t1, su_time_t const t2) |
| Time difference in milliseconds. | |
| su_time_t | su_time_add (su_time_t t, su_duration_t dur) |
| Add milliseconds to the time. | |
| su_time_t | su_time_dadd (su_time_t t, double dur) |
| Add seconds to the time. | |
| int | su_time_print (char *s, int n, su_time_t const *tv) |
| Print su_time_t timestamp. | |
| su_ntp_t | su_ntp_now (void) |
| Get NTP timestamp. | |
| uint32_t | su_ntp_sec (void) |
| Get NTP seconds. | |
| uint32_t | su_ntp_hi (su_ntp_t) |
| High 32 bit of NTP timestamp. | |
| uint32_t | su_ntp_lo (su_ntp_t) |
| Low 32 bit of NTP timestamp. | |
| uint32_t | su_ntp_mw (su_ntp_t ntp) |
| Middle 32 bit of NTP timestamp. | |
| uint32_t | su_ntp_fraq (su_time_t t) |
| Middle 32 bit of NTP timestamp. | |
| uint32_t | su_time_ms (su_time_t t) |
| Time as milliseconds. | |
| uint32_t | su_random (void) |
| Get random 32-bit unsigned number. | |
|
|
Compare two timestamps. The macro SU_TIME_CMP() compares two su_time_t timestamps.
|
|
|
Seconds from 1.1.1900 to 1.1.1970.
|
|
|
Time difference in microseconds. The type su_duration_t is used to present small time differences (24 days), usually calculated between two su_time_t timestamps. Note that the su_duration_t is signed. |
|
|
NTP timestamp. NTP timestamp is defined as microseconds since epoch (1-Jan-1900) with 64-bit resolution. |
|
|
|
|
||||||||||||
|
Time difference in milliseconds. Calculates the duration from t2 to t1 in milliseconds.
|
|
|
Get current time as nanoseconds. Return the current time expressed as nanoseconds. The time returned is monotonic and never goes back - if the underlying system supports such a clock.
|
|
|
Get current time as nanoseconds since epoch. Return the current NTP timestamp expressed as nanoseconds since epoch (January 1st 1900).
|
|
|
Get current time. Return the current timestamp in su_time_t structure.
|
|
|
High 32 bit of NTP timestamp.
|
|
|
Low 32 bit of NTP timestamp.
|
|
|
Middle 32 bit of NTP timestamp.
|
|
|
Get NTP timestamp. The function su_ntp_now() returns the current NTP timestamp. NTP timestamp is seconds elapsed since January 1st, 1900.
|
|
|
Get NTP seconds. The function su_ntp_sec() returns the seconds elapsed since January 1st, 1900.
|
|
|
Get current time.
The function
|
|
||||||||||||
|
Add milliseconds to the time.
|
|
||||||||||||
|
Compare two timestamps. The function su_time_cmp() compares two su_time_t timestamps.
|
|
||||||||||||
|
Add seconds to the time.
|
|
||||||||||||
|
Difference between two timestamps. The function returns difference between two timestamps in seconds (t1 - t2).
|
|
||||||||||||||||
|
Print su_time_t timestamp. This function prints a su_time_t timestamp as a decimal number to the given buffer.
|