ldns(3)
β¨ NAME β¨
okay bestie, welcome to ldns(3) π this is the page for the ldns library's duration stuff β we're talking ldns_duration_type, ldns_duration_create, ldns_duration_create_from_string, ldns_duration_cleanup, ldns_duration_compare, ldns_duration2string, and ldns_duration2time β the duration type and all its lil' related functions. it's giving time math, but make it cute π
πΈ SYNOPSIS πΈ
#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);
π DESCRIPTION π
π¦ ldns_duration_type
it's a Duration, periodt. here's the whole struct, no notes:
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;
π the functions, one by one
β ldns_duration_create()
creates a brand new 'instant' duration β like, zero time, freshly hatched, main character energy.
- returns
ldns_duration_type*β the duration it just created
π ldns_duration_create_from_string()
makes a duration out of a string, iykyk.
- str: string-format duration
- returns
ldns_duration_type*β the duration it created
π ldns_duration_cleanup()
cleans up a duration. bye babe, thanks for the memories π
- duration: duration to be cleaned up
π₯ ldns_duration_compare()
compares two durations, head to head, vibe check style.
- d1: one duration
- d2: another duration
- returns
intβ0if equal,-1if d1 < d2,1if d2 < d1
β¨ ldns_duration2string()
turns a duration into a string, slay.
- duration: duration to be converted
- returns
char*β string-format duration
π ldns_duration2time()
turns a duration into a time. no cap.
- duration: duration to be converted
- returns
time_tβ time-format duration
π AUTHOR π
The ldns team at NLnet Labs. absolute icons, fr fr.
π REPORTING BUGS π
found a bug bestie? don't suffer in silence, tell them:
- email:
dns-team@nlnetlabs.nl - or on GitHub at
https://github.com/NLnetLabs/ldns/issues
π COPYRIGHT π
Copyright (c) 2004 - 2006 NLnet Labs.
Licensed under the BSD License.
there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. read it and weep, but like, legally π
π«Ά SEE ALSO π«Ά
perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
π REMARKS π
This manpage was automatically generated from the ldns source code. yes, a robot wrote the bones of this, and I gave it the glow-up π§
and that's the whole page, bestie!! this one's from the ldns(3) manual, dated 30 May 2006 β vintage but still serving looks π
mwah, go write some duration code π¦
π¦ where this page comes from
- alpine 3.22: ldns-doc 1.8.4-r0 Β· BSD-3-Clause
- alpine 3.23: ldns-doc 1.8.4-r1 Β· BSD-3-Clause
- alpine 3.24: ldns-doc 1.8.4-r1 Β· BSD-3-Clause
- arch rolling: ldns 1.9.2-1 Β· custom:BSD
- debian trixie: libldns-dev 1.8.4-2+b1
- fedora 43: ldns-devel 1.8.4-8.fc43 Β· BSD-3-Clause
- fedora 43: ldns-devel 1.8.4-8.fc43 Β· BSD-3-Clause
- fedora 43: ldns-devel 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 43: ldns-devel 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.0-2.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.0-2.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.2-1.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.2-1.fc44 Β· BSD-3-Clause
- nixos 26.05: ldns 1.9.2
- nixpkgs unstable: ldns 1.9.2
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- ubuntu questing: libldns-dev 1.8.4-2build1
- ubuntu resolute: libldns-dev 1.8.4-2build3
- ubuntu stonking: libldns-dev 1.9.2-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms