diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-10-22 04:24:54 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-11-05 17:36:17 +0000 |
commit | 076be248532e3fa0b261addb9c6dc93563d02644 (patch) | |
tree | ed3b626d307369dcb7c8976ab2598058a2dfbead /misc/thread_pool.c | |
parent | e268dead30255fdc1207f3c2466b4132c97bb078 (diff) | |
download | mpv-076be248532e3fa0b261addb9c6dc93563d02644.tar.bz2 mpv-076be248532e3fa0b261addb9c6dc93563d02644.tar.xz |
timer: remove unnecesary time conversions
Diffstat (limited to 'misc/thread_pool.c')
-rw-r--r-- | misc/thread_pool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/thread_pool.c b/misc/thread_pool.c index f57dc8cfcf..e20d9d07e6 100644 --- a/misc/thread_pool.c +++ b/misc/thread_pool.c @@ -71,7 +71,7 @@ static MP_THREAD_VOID worker_thread(void *arg) if (pool->num_threads > pool->min_threads) { if (!destroy_deadline) - destroy_deadline = mp_time_ns_add(mp_time_ns(), DESTROY_TIMEOUT); + destroy_deadline = mp_time_ns() + MP_TIME_S_TO_NS(DESTROY_TIMEOUT); if (mp_cond_timedwait_until(&pool->wakeup, &pool->lock, destroy_deadline)) got_timeout = pool->num_threads > pool->min_threads; } else { |