diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-09-18 10:16:17 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-09-18 23:08:04 -0400 |
commit | 37f68b28cf1624d9188872bea1e8efc15141824c (patch) | |
tree | 2cfae131c223c63e319c28cf6ce31ad3fb74c868 | |
parent | 94e473cf5670f5b0373c3ec0692707e2ef9618ad (diff) | |
download | stasis-37f68b28cf1624d9188872bea1e8efc15141824c.tar.gz |
Comment get_task_duration
-rw-r--r-- | src/multiprocessing.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/multiprocessing.c b/src/multiprocessing.c index 8c7c2e8..4ae9b31 100644 --- a/src/multiprocessing.c +++ b/src/multiprocessing.c @@ -161,6 +161,8 @@ struct MultiProcessingTask *mp_pool_task(struct MultiProcessingPool *pool, const } static void get_task_duration(struct MultiProcessingTask *task, struct timespec *result) { + // based on the timersub() macro in time.h + // This implementation uses timespec and increases the resolution from microseconds to nanoseconds. struct timespec *start = &task->time_data.t_start; struct timespec *stop = &task->time_data.t_stop; result->tv_sec = (stop->tv_sec - start->tv_sec); |