Go to the source code of this file.
Functions | |
ldns_duration_type * | ldns_duration_create (void) |
This file is copied from the OpenDNSSEC source repository and only slightly adapted to make it fit. More... | |
int | ldns_duration_compare (const ldns_duration_type *d1, const ldns_duration_type *d2) |
Compare durations. More... | |
ldns_duration_type * | ldns_duration_create_from_string (const char *str) |
Create a duration from string. More... | |
char * | ldns_duration2string (const ldns_duration_type *d) |
Convert a duration to a string. More... | |
time_t | ldns_duration2time (const ldns_duration_type *duration) |
Convert a duration to a time. More... | |
void | ldns_duration_cleanup (ldns_duration_type *duration) |
Clean up duration. More... | |
ldns_duration_type* ldns_duration_create | ( | void | ) |
This file is copied from the OpenDNSSEC source repository and only slightly adapted to make it fit.
Create a new 'instant' duration.
Durations. Create a new 'instant' duration.
Definition at line 54 of file duration.c.
References ldns_duration_struct::days, ldns_duration_struct::hours, ldns_duration_struct::minutes, ldns_duration_struct::months, ldns_duration_struct::seconds, ldns_duration_struct::weeks, and ldns_duration_struct::years.
int ldns_duration_compare | ( | const ldns_duration_type * | d1, |
const ldns_duration_type * | d2 | ||
) |
Compare durations.
[in] | d1 | one duration |
[in] | d2 | another duration |
Definition at line 78 of file duration.c.
References ldns_duration_struct::days, ldns_duration_struct::hours, ldns_duration_struct::minutes, ldns_duration_struct::months, ldns_duration_struct::seconds, ldns_duration_struct::weeks, and ldns_duration_struct::years.
ldns_duration_type* ldns_duration_create_from_string | ( | const char * | str | ) |
Create a duration from string.
[in] | str | string-format duration |
Definition at line 118 of file duration.c.
References ldns_duration_struct::days, ldns_duration_struct::hours, ldns_duration_cleanup(), ldns_duration_create(), ldns_duration_struct::minutes, ldns_duration_struct::months, ldns_duration_struct::seconds, ldns_duration_struct::weeks, and ldns_duration_struct::years.
char* ldns_duration2string | ( | const ldns_duration_type * | duration | ) |
Convert a duration to a string.
[in] | duration | duration to be converted |
Definition at line 211 of file duration.c.
time_t ldns_duration2time | ( | const ldns_duration_type * | duration | ) |
Convert a duration to a time.
[in] | duration | duration to be converted |
Definition at line 246 of file duration.c.
References ldns_duration_struct::days, ldns_duration_struct::hours, ldns_duration_struct::minutes, ldns_duration_struct::months, ldns_duration_struct::seconds, ldns_duration_struct::weeks, and ldns_duration_struct::years.
void ldns_duration_cleanup | ( | ldns_duration_type * | duration | ) |
Clean up duration.
[in] | duration | duration to be cleaned up |
Definition at line 274 of file duration.c.