]> git.ipfire.org Git - thirdparty/coreutils.git/commit
shred: use gethrxtime instead of time
authorCollin Funk <collin.funk1@gmail.com>
Sun, 7 Dec 2025 01:19:55 +0000 (17:19 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Sun, 7 Dec 2025 19:37:17 +0000 (11:37 -0800)
commitc3eb8b45798133dba06defd72f6280fd1ce3fcd3
treee6bcca53414fafc5c1b931afb4d65b042d3d287b
parent3c9d4fdd83ca1e13d001ef160301c10eb5de50c6
shred: use gethrxtime instead of time

The gethrxtime function uses a monotonic clock if available on the
system. The effect should be unnoticeable since we print --verbose
information every 5 seconds, but is more correct and we already do the
same in 'dd'.

* src/local.mk (src_shred_LDADD): Add $(GETHRXTIME_LIB).
* src/shred.c (dopass): Use xtime_t instead of time_t. Use gethrxtime
instead of time.
src/local.mk
src/shred.c