taia_now(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

taia_now β€” bestie, this one grabs you the current time. Like, right now. Clock in, queen. ⏰✨


πŸŽ€ SYNTAX πŸŽ€

#include <libowfat/taia.h>

extern int taia_now(struct taia* t);

That's it. That's the whole vibe. One header, one function, one pointer. πŸ’…


🌸 DESCRIPTION 🌸

taia_now... no wait, taia_now puts the current time into t. But fr fr, let's be precise, because we are precise girlies here:

More precisely β€” and yes the original page literally says tai_now here, not taia_now, and we are not fixing it because facts are facts, bestie 🫢 β€” tai_now puts into t its best guess as to the TAI64NA label for the 1-attosecond interval that contains the current time.

One attosecond. That's 1/1,000,000,000,000,000,000 of a second. She's ambitious and we respect that. πŸ˜­πŸ’€

This implementation of taia_now assumes that the time_t returned from the time function represents the number of TAI seconds since 1970-01-01 00:00:10 TAI. And the way that this matches up is with the convention used by the Olson tz library in "right" mode. Iykyk. 🌈

⚠️ BEWARE, BESTIE. Many clocks are not set accurately. And even the best scientific clocks are nowhere near 1-attosecond accuracy. So no, this is not the crown jewel of precision. πŸ˜­πŸ‘‘

BUT. Here's the slay: an inaccurate clock may still produce reasonably accurate time differences. So if you're measuring how long something took rather than what time it is, you're still eating. πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹

  • tai_now(3) β€” her sister, the icon herself. πŸ‘‘

Okay so this page came from the Library Functions Manual, section 3, page taia_now(3), and ngl there's no date stamped on this one β€” it just shows up with the same taia_now(3) footer it started with. Love that for her. No notes. Periodt. πŸ’–βœ¨πŸŽ€