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:53:55 +0100 |
| commit | dd3ddb4359a9f8b7ce08ce92e0315dccc65bf40b (patch) | |
| tree | 80fab3e048274d4eacc343506505bbff6aa91c1e /src/lib | |
| parent | e8210032df3c2fadb48c441323d0533aed488bd1 (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; } |
