Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
None
-
None
-
d16ba63f5cdf1e6c9dc96200bb80b2155437c4ee
Description
Hi,
This works.
QTimer::singleShot(std::chrono::milliseconds(1000), []
This is not supported:
QTimer::singleShot(1s, []{ qDebug() << "1 second passed"; }
);
This uses the chrono literals (new since C++14), more on that here: http://en.cppreference.com/w/cpp/chrono/duration
Could support for these literals be added to the QTimer methods where one provides time (start, singleshot, setInterval). Big plus for also providing a getters (remainingTime, intervalAsDuration and in QElapsedTimer::elaped) as clock ticks. That would allow a chrono duration_cast to any of the chrono supported times.