NNG_CLOCK(3supp)

πŸ“¦ version 1.11, in alpine 3.24

πŸ’– 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