aboutsummaryrefslogtreecommitdiff
path: root/src/multiprocessing.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-10-01 15:49:11 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-10-01 15:49:11 -0400
commit23253d98bce3c4b21b887f175c7cd7135614ea5a (patch)
treece633acebec78bf37e60ea381562c04db267b51a /src/multiprocessing.c
parente462c06cae9f75526fa200531615bdcc47716eef (diff)
downloadstasis-23253d98bce3c4b21b887f175c7cd7135614ea5a.tar.gz
Use watcher_diff to see how many seconds have elapsed.
Diffstat (limited to 'src/multiprocessing.c')
-rw-r--r--src/multiprocessing.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/multiprocessing.c b/src/multiprocessing.c
index 38d85fc..1c585ff 100644
--- a/src/multiprocessing.c
+++ b/src/multiprocessing.c
@@ -352,8 +352,7 @@ int mp_pool_join(struct MultiProcessingPool *pool, size_t jobs, size_t flags) {
time_t watcher_diff = time(NULL) - watcher;
if (watcher_diff == 0) {
printf("[%s:%s] Task is running (pid: %d)\n", pool->ident, slot->ident, slot->parent_pid);
- }
- if (watcher > 9) {
+ } else if (watcher_diff > 9) {
watcher = time(NULL);
}
}