NNG_STAT_TIMESTAMP(3)
π nng_stat_timestamp β get statistic timestamp π
okay bestie, pull up a chair, we're looking at nng_stat_timestamp(3) from the NNG Reference Manual and it's genuinely such a cute little function. no cap. π¦
β¨ SYNOPSIS β¨
#include <nng/nng.h>
typedef struct nng_stat nng_stat;
uint64_t nng_stat_timestamp(nng_stat *stat);
like, that's it. that's the whole vibe. π
πΈ DESCRIPTION πΈ
so nng_stat_timestamp() hands you back a timestamp, and that timestamp is measured as a number of milliseconds since some arbitrary value in the past. yes, arbitrary. it's not epoch time, it's not your birthday, it's just... some point. we don't ask. π
and here's the part that's lowkey important: even within the same snapshot, different statistics might have different timestamp values?? π iconic behaviour actually. that's because the timestamp represents the moment when that particular statistic was captured β not when the whole snapshot got assembled. every stat has main character energy and its own little moment in time. π
Tip π‘ these values are intended to facilitate calculation of rates, by comparing values from one snapshot with a subsequent one. so like, snapshot, snapshot again, do a lil subtraction, boom β you've got yourself a rate. math ate. π₯
Tip π‘ the values used here have the same offset as the nng_clock() supplemental function. super useful when you want to convert these values into local clock time. iykyk. β
π RETURN VALUES π
the timestamp when stat was captured, measured as a number of milliseconds since some time in the past. she's giving "vibes-based chronology" and honestly? we respect it. π«Ά
π ERRORS π
None. literally none. no error states, no sadness, no drama. this function is unbothered, moisturized, in her lane, focused, flourishing. β¨
π SEE ALSO π
and that's the whole page bestie!! π¦π go forth and timestamp responsibly. this was NNG Reference Manual, dated 2026-06-30 β love her, respect her, cite her. mwah. π πΈπ
π¦ 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