times icon indicating copy to clipboard operation
times copied to clipboard

add btime for linux

Open mateusz834 opened this issue 2 years ago • 1 comments

It adds btime support for linux using statx syscall.

mateusz834 avatar Jun 18 '22 11:06 mateusz834

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

mateusz834 avatar Aug 03 '22 16:08 mateusz834

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 avatar Oct 02 '23 15:10 gildesmarais

@gildesmarais Merged, I'll do some testing and maybe some minor refactoring before marking it as a release.

djherbis avatar Oct 03 '23 00:10 djherbis

Cool - will that be v1.6.0?

certuna avatar Oct 12 '23 07:10 certuna

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.

djherbis avatar Oct 14 '23 18:10 djherbis

Released: https://github.com/djherbis/times/releases/tag/v1.6.0

djherbis avatar Oct 20 '23 15:10 djherbis

I verified that I did get btime in a linux codespace :)

djherbis avatar Oct 20 '23 15:10 djherbis