ldns(3)

πŸ“¦
version 1.9.2 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 β€” 0 if equal, -1 if d1 < d2, 1 if 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:


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 πŸ¦‹