times
times copied to clipboard
add btime for linux
It adds btime support for linux using statx syscall.
I replaced the Fd() with SyscallConn(), because the Fd() sets the fd to blocking mode, but It increases the allocation count. Before:
BenchmarkStatFile-4 1000000 1257 ns/op 97 B/op 2 allocs/op
After:
BenchmarkStatFile-4 805016 1577 ns/op 401 B/op 6 allocs/op
I came here via the mentioned Navidrome PR. Thank you for maintaining this library and thank you for this PR. 👍🏽
How are chances to see a merge of this PR? :)
@gildesmarais Merged, I'll do some testing and maybe some minor refactoring before marking it as a release.
Cool - will that be v1.6.0?
It should be, it still needs testing with Linux with btime available I believe to verify it works.
I haven't had a chance to try it yet.
Released: https://github.com/djherbis/times/releases/tag/v1.6.0
I verified that I did get btime in a linux codespace :)