Your company here — click to reach over 10,000 unique daily visitors

ldns_duration_type - Man Page

duration type and related functions


#include <stdint.h>
#include <stdbool.h>

#include <ldns/ldns.h>

ldns_duration_type* ldns_duration_create(void);

ldns_duration_type* ldns_duration_create_from_string(const char* str);

void ldns_duration_cleanup(ldns_duration_type* duration);

int ldns_duration_compare(const ldns_duration_type* d1, const ldns_duration_type* d2);

char* ldns_duration2string(const ldns_duration_type* duration);

time_t ldns_duration2time(const ldns_duration_type* duration);



struct ldns_duration_struct
   time_t years;
   time_t months;
   time_t weeks;
   time_t days;
   time_t hours;
   time_t minutes;
   time_t seconds;

typedef struct ldns_duration_struct ldns_duration_type;

ldns_duration_create() Create a new 'instant' duration.
Returns ldns_duration_type* created duration

ldns_duration_create_from_string() Create a duration from string.
str: string-format duration
Returns ldns_duration_type* created duration

ldns_duration_cleanup() Clean up duration.
duration: duration to be cleaned up

ldns_duration_compare() Compare durations.
d1: one duration
d2: another duration
Returns int 0 if equal, -1 if d1 < d2, 1 if d2 < d1

ldns_duration2string() Convert a duration to a string.
duration: duration to be converted
Returns char* string-format duration

ldns_duration2time() Convert a duration to a time.
duration: duration to be converted
Returns time_t time-format duration


The ldns team at NLnet Labs.

Reporting Bugs

Please report bugs to ldns-team@nlnetlabs.nl or in  our bugzilla at http://www.nlnetlabs.nl/bugs/index.html

See Also

perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.


This manpage was automatically generated from the ldns source code.

Referenced By

The man pages ldns_duration2string(3), ldns_duration2time(3), ldns_duration_cleanup(3), ldns_duration_compare(3), ldns_duration_create(3) and ldns_duration_create_from_string(3) are aliases of ldns_duration_type(3).

30 May 2006