diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-10-01 15:49:11 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-10-01 15:49:11 -0400 |
commit | 23253d98bce3c4b21b887f175c7cd7135614ea5a (patch) | |
tree | ce633acebec78bf37e60ea381562c04db267b51a /src | |
parent | e462c06cae9f75526fa200531615bdcc47716eef (diff) | |
download | stasis-23253d98bce3c4b21b887f175c7cd7135614ea5a.tar.gz |
Use watcher_diff to see how many seconds have elapsed.
Diffstat (limited to 'src')
-rw-r--r-- | src/multiprocessing.c | 3 |
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); } } |