NNG_CLOCK(3supp)
π NAME π
nng_clock β get time. yes bestie, that is literally the whole name π and this little icon is NNG_CLOCK(3supp) from the NNG Reference Manual π«Ά
β¨ SYNOPSIS β¨
#include <nng/nng.h>
typedef uint64_t nng_time;
nng_time nng_clock(void);
π DESCRIPTION π
okay so nng_clock() gives you the number of elapsed milliseconds since some arbitrary time in the past. not like a cute calendar date, just a reference point somewhere back there π
the resolution of the clock depends on the underlying timing facilities of the system. so like, your system's timing setup is the main character here, and it decides how fine-grained things get πΈ
this function may be used for timing, but applications should not expect very fine-grained values. periodt. it's giving "useful timer energy," not "precision nanosecond drama" π
Important: the reference time will be the same for a given program, but different programs may have different references. so don't go comparing raw clock values across programs like they're matching bestie bracelets, because they might not line up π
Tip: this function should help with setting appropriate timeouts. very handy, very slay, very "now I know how long to wait" energy β³β¨
π« RETURN VALUES π«
milliseconds since reference time. that's the whole return value, bestie β a uint64_t-flavored number of milliseconds π«Ά
π ERRORS π
none. literally none. not a single error, no cap π
π₯ SEE ALSO π₯
go read these next, bestie:
xoxo, your local Unix bestie π
β this was the NNG Reference Manual, page NNG_CLOCK(3supp), dated 2026-01-13 πβ
π¦ where this page comes from
- alpine 3.24: nng-doc 1.11-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms