diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-11-04 23:25:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-11-13 22:34:20 +0100 |
| commit | b81e38775c4c03eaeb64bce19cec408e99dded14 (patch) | |
| tree | f86fea5e5648c9326e53180177d5e6fb4d90df23 /src/lib | |
| parent | 1e380a75dd4e87f8f0474b4d0899708eba006480 (diff) | |
Cleanup: use seconds() method.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/job.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc index 52558046a..cb2120de1 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -376,8 +376,7 @@ Job::set_progress (float p, bool force) struct timeval now; gettimeofday (&now, 0); if (_last_progress_update && _last_progress_update->tv_sec > 0) { - double const elapsed = (now.tv_sec + now.tv_usec / 1000000.0) - - (_last_progress_update->tv_sec + _last_progress_update->tv_usec / 1000000.0); + double const elapsed = seconds(now) - seconds(*_last_progress_update); if (elapsed < 0.5) { return; } |
