Test still passes. I did not try changing the date to 2039 ;)
Details
Diff Detail
- Branch
- 2019_04_collectionscheduler_timet
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 10726 Build 10744: arc lint + arc unit
src/server/collectionscheduler.cpp | ||
---|---|---|
222–225 | isn't this still problematic (i.e. the cast to int)? |
src/server/collectionscheduler.h | ||
---|---|---|
60 ↗ | (On Diff #55708) | I'm tempted to use std::chrono::time_point here instead of qint64, which is a better abstraction for time units. You can create a time_point from std::chrono::secods(QDateTime::currentSecsSinceEpoch()), and a difference of two time_points is a std::chrono::duration which can be passed directly to QTimer without having to care about conversion to correct units. If you don't feel up to it (I remember you mentioned you are not much familiar with std::chrono), I'm fine with this version too, I can enhance it later when I get time. Getting this tested and fixed is more important. |
autotests/server/collectionschedulertest.cpp | ||
---|---|---|
52 ↗ | (On Diff #55966) | Add using namespace std::chrono_literals to the top, then you can use 4m instead of having to spell out the whole type (also elsewhere in the code). |