D20483: CollectionScheduler: add tests for the actual QTimer interval

Daniel Vrátil noreply at phabricator.kde.org
Fri Apr 12 09:26:45 BST 2019


dvratil requested changes to this revision.
dvratil added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> collectionschedulertest.cpp:33
> +static int minutesToMilli(int minutes) {
> +    // This is how we write * 60 * 1000, in this day and age :-)
> +    return std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::minutes(minutes)).count();

No, you use `std::chrono_literals` :-)

> collectionscheduler.h:72
> +     */
> +    int currentTimerInterval() const;
> +

So why not return `std::chrono::milliseconds`, then? This is why we have `std::chrono` now - so that we no longer have to awkwardly check the documentation for time units and get 
a comparison between durations of different time units for free :-)

REVISION DETAIL
  https://phabricator.kde.org/D20483

To: dfaure, dvratil
Cc: kde-pim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190412/e75b4df7/attachment.html>


More information about the kde-pim mailing list