summaryrefslogtreecommitdiff
path: root/Src/signals.c
diff options
context:
space:
mode:
authordana <dana@dana.is>2024-12-26 09:36:45 -0600
committerdana <dana@dana.is>2024-12-26 10:09:25 -0600
commit6bb792dba89016c250bc9f2581c9c267dd322254 (patch)
tree436bc0514ff4a7d63c12af2aadc060f8ed645788 /Src/signals.c
parent7798fd88ac42f55980fb9832f2f7e379392fe6aa (diff)
downloadzsh-6bb792dba89016c250bc9f2581c9c267dd322254.tar.gz
zsh-6bb792dba89016c250bc9f2581c9c267dd322254.zip
53257: use monotonic clock where appropriate
update the following features to use the monotonic clock for calculating time deltas and intervals: * MAILCHECK parameter * PERIOD parameter * SECONDS parameter * %(nS.t.f) prompt-expansion sequence * time built-in's elapsed time and cpu % values * zsh/zftp ZFTP_TMOUT parameter * zsh/zprof timings also use CLOCK_MONOTONIC_RAW instead of CLOCK_MONOTONIC on macOS
Diffstat (limited to 'Src/signals.c')
-rw-r--r--Src/signals.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Src/signals.c b/Src/signals.c
index 86f1a49f6..de42f302d 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -342,8 +342,7 @@ wait_for_processes(void)
zwarn("job can't be suspended");
} else {
#if defined(HAVE_WAIT3) && defined(HAVE_GETRUSAGE)
- struct timezone dummy_tz;
- gettimeofday(&pn->endtime, &dummy_tz);
+ zgettime_monotonic_if_available(&pn->endtime);
#ifdef WIFCONTINUED
if (WIFCONTINUED(status))
pn->status = SP_RUNNING;