aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorCarl Åstholm <carl@astholm.se>2025-11-05 00:51:09 +0100
committerCarl Åstholm <carl@astholm.se>2025-11-10 22:12:40 +0100
commit5f1392247d8bb0c6355f2986ff6fbf09a0885b6f (patch)
treef2de8d88232d06748a01af9df1228e17911b3ddc /src/Compilation.zig
parented7f2588e409b6d154f4a08bd0029ef1e7beb06b (diff)
downloadzig-5f1392247d8bb0c6355f2986ff6fbf09a0885b6f.tar.gz
zig-5f1392247d8bb0c6355f2986ff6fbf09a0885b6f.zip
io: Redefine `Clock.real` to return timestamps relative to the POSIX/Unix epoch
`Clock.real` being defined to return timestamps relative to an implementation-specific epoch means that there's currently no way for the user to translate returned timestamps to actual calendar dates without digging into implementation details of any particular `Io` implementation. Redefining it to return timestamps relative to 1970-01-01T00:00:00Z fixes this problem. There are other ways to solve this, such as adding a new vtable function for returning the implementation-specific epoch, but in terms of complexity this redefinition is by far the simplest solution and only amounts to a simple 96-bit integer addition's worth of overhead on OSes like Windows that use non-POSIX/Unix epochs.
Diffstat (limited to 'src/Compilation.zig')
0 files changed, 0 insertions, 0 deletions