NNG_DURATION(5)
π NNG_DURATION β relative time in milliseconds, bestie π
okay so real quick, before we get into it: this is page NNG_DURATION(5) from the NNG Reference Manual, and yes she's a whole vibe. let's go π¦
β¨ NAME β¨
nng_duration β literally just a relative time in milliseconds, no cap β±οΈ
πΈ SYNOPSIS πΈ
#include <nng/nng.h>
typedef int32_t nng_duration;
#define NNG_DURATION_INFINITE (-1)
#define NNG_DURATION_DEFAULT (-2)
#define NNG_DURATION_ZERO (0)
like. it's an int32_t. that's the whole thing. gorgeous. π
π DESCRIPTION π
so an nng_duration is a relative time, measured in milliseconds. that's it, that's the girl. she's most often hanging out with timers and timeouts, because obviously, that's her main character era. π
and then there's a couple of special values that got set aside that carry β¨special meaningsβ¨ β think of them as the VIP section of the duration type:
NNG_DURATION_DEFAULTβ this one's like "idk, use the context-specific default, whatever that is". she's the "you pick" friend. πNNG_DURATION_INFINITEβ effectively an infinite duration. used most often to disable timeouts entirely. she does not do deadlines, she does not do clocks, she is forever. πNNG_DURATION_ZEROβ a zero-length duration. this one's for performing a single polling operation, i.e. "check once and move on, don't wait around for anybody." π«Ά
also lowkey important: the value ofNNG_DURATION_INFINITEis(-1), the value ofNNG_DURATION_DEFAULTis(-2), andNNG_DURATION_ZEROis(0). they are negative and zero on purpose, bestie. not a typo. iconic behaviour honestly.
π¦ SEE ALSO π¦
go read those too, iykwim π
and that's the page!! this was NNG_DURATION(5) from the NNG Reference Manual, dated 2026-06-30. slay, periodt, go set a timeout responsibly ππβ¨
π¦ where this page comes from
- ubuntu stonking: libnng-dev 1.12.0-1 Β· MIT OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms