tai64n(8)
π NAME π
okay bestie, meet tai64n β she puts a precise timestamp on each line. that's it, that's the job. (it's tai64n(8), from the System Manager's Manual, if you're keeping receipts π)
β¨ SYNOPSIS β¨
tai64n
no flags, no args, no drama. she just runs. π
π«Ά DESCRIPTION π«Ά
so here's the vibe: tai64n reads lines from stdin. and for each and every line it reads, it writes four things to stdout:
- an
@, - a precise timestamp,
- a space, and
- a copy of the input line.
and the timestamp? it marks the exact moment tai64n read the first character of that line. like, the first character. not the last. not when the line finished. the very first one. she's precise like that. β±οΈβ¨
and here's the lowkey iconic part: tai64n does not allocate any memory after it starts. not a single byte. she's already got everything she needs. main character with zero baggage, fr fr. π§
π¦ TIMESTAMPS π¦
the timestamps tai64n uses are 12-byte TAI64N labels in external TAI64N format, printed as 24 lowercase hexadecimal characters. lowercase!! we love a lowercase queen. π
and when you wanna read those timestamps like a human being instead of a hex goblin, you use tai64nlocal(8) to convert them to a human-readable format. iykyk. π
let's do the example, because it ate:
the timestamp4000000037c219bf2ef02e94refers to the nanosecond beginning exactly935467455.787492500seconds after the beginning of 1970 TAI;37c219bfhexadecimal is935467455, and2ef02e94hexadecimal is787492500.
see how it splits?? the two halves of the hex are literally the two halves of the number. she's showing off and honestly? she should. π₯
now, the current implementation of tai64n relies on the UNIX gettimeofday library routine to return the current time as the number of TAI seconds since 1970-01-01 00:00:10 TAI. bestie, note that 00:00:10. ten seconds in. it's giving leap-second lore. π
β οΈ beware, okay? most gettimeofday implementations are not Y2038-compliant. and furthermore, most clocks are not set accurately. so likeβ¦ the precision is real but the accuracy is on your system, not on her. not her fault. π
π EXIT CODES π
tai64nexits0when it sees end of input. clean exit, no notes. β¨- it exits
111without an error message if it has trouble readingstdinor writingstdout. silent queen, suffering quietly. π no error message, just vibes and a111.
π SEE ALSO π
the whole daemontools family reunion, go say hi:
supervise(8), svc(8), svok(8), svstat(8), svscanboot(8), svscan(8), readproctitle(8), fghack(8), pgrphack(8), multilog(8), tai64nlocal(8), setuidgid(8), envuidgid(8), envdir(8), softlimit(8), setlock(8)
and the sacred link: http://cr.yp.to/daemontools.html
that's the whole page bestie π«Ά straight out of the System Manager's Manual, this is tai64n(8) β go timestamp something, you're gonna slay. πβ¨πΈ
π¦ where this page comes from
- debian bookworm: daemontools 1:0.76-8.1 Β· LicenseRef-public-domain
- debian trixie: daemontools 1:0.76-14 Β· LicenseRef-public-domain
- nixpkgs unstable: daemontools 0.76
- ubuntu jammy: daemontools 1:0.76-7
- ubuntu noble: daemontools 1:0.76-10 Β· LicenseRef-public-domain
- ubuntu questing: daemontools 1:0.76-15
- ubuntu resolute: daemontools 1:0.76-15build1 Β· LicenseRef-public-domain
- ubuntu stonking: daemontools 1:0.76-15build1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms