X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fjob.cc;h=cb2120de1ea492fb907f3a74d5653a3f007739eb;hb=b81e38775c4c03eaeb64bce19cec408e99dded14;hp=b0ca8a7375b5679718efb13a58c6762831e7cbe9;hpb=c370c651eba466f5073384de8b304a2625c64b89;p=dcpomatic.git diff --git a/src/lib/job.cc b/src/lib/job.cc index b0ca8a737..cb2120de1 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -44,7 +44,7 @@ using std::list; using std::cout; using std::shared_ptr; using boost::optional; -using boost::function; +using std::function; using namespace dcpomatic; /** @param film Associated film, or 0 */ @@ -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; }