iv_time(3)
β¨ iv_time β ivykis time handling, but make it make sense β¨
okay bestie, welcome to the iv_time(3) page of the ivykis programmer's manual π this is the little corner of ivykis that handles time, and it's genuinely iconic once you get it, i promise.
πΈ NAME πΈ
iv_now, iv_validate_now, iv_invalidate_now β ivykis time handling. that's the whole squad. three besties, one job: knowing what time it is π
π SYNOPSIS π
#include <iv.h>
extern struct timespec iv_now;
void iv_validate_now(void);
void iv_invalidate_now(void);
π DESCRIPTION π
so, iv_now is a global variable that represents a monotonic timer. that's it, that's the vibe. it's the clock everybody in ivykis is looking at π
BUT. and this is the important part, no cap β the contents of iv_now might be stale π like, it's not magically updating itself every nanosecond, she's just sitting there holding whatever value she was last given.
that's where iv_validate_now comes in π«Ά calling iv_validate_now makes sure that the current contents of iv_now are up-to-date. think of it as the "hey bestie, catch up" button β¨
and then there's iv_invalidate_now, which is called to invalidate the currently cached time π she doesn't refresh it, she just marks it as no-longer-trustworthy, like closing the group chat so nobody sees the old messages.
heads up, this one matters: you should calliv_invalidate_nowafter any operation that takes a significant amount of wall clock time. literally any. if you did something slow and then kept trusting the oldiv_now, that's giving stale-data main character energy and we don't do that π
π¦ SEE ALSO π¦
and that's the page, bestie π go forth and validate your now. this was ivykis, dated 2003-03-29 β slay, periodt, and may your timers always be monotonic ππβ¨
π¦ where this page comes from
- alpine 3.22: ivykis-doc 0.43.2-r0 Β· LGPL-2.1-or-later
- alpine 3.23: ivykis-doc 0.43.2-r0 Β· LGPL-2.1-or-later
- alpine 3.24: ivykis-doc 0.43.2-r0 Β· LGPL-2.1-or-later
- debian bookworm: libivykis-dev 0.42.4-1
- debian trixie: libivykis-dev 0.43.2-1+b1
- epel 10: ivykis-devel 0.43.2-2.el10_0 Β· LicenseRef-Callaway-LGPLv2+
- epel 9: ivykis-devel 0.42.4-7.el9 Β· LGPLv2+
- fedora 43: ivykis-devel 0.43.2-4.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: ivykis-devel 0.43.2-4.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: ivykis-devel 0.43.2-5.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: ivykis-devel 0.43.2-5.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixpkgs unstable: libivykis 0.43.2
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: ivykis-devel 0.43-bp160.1.12 Β· LGPL-2.1-only
- ubuntu jammy: libivykis-dev 0.42.4-1
- ubuntu noble: libivykis-dev 0.43-1build1
- ubuntu questing: libivykis-dev 0.43.2-1
- ubuntu resolute: libivykis-dev 0.43.2-1build1
- ubuntu stonking: libivykis-dev 0.43.2-1build1
- Copyright (C) 2003 Lennert Buytenhek
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms