I'm new in the C++ and QT-Programming and want to get the time in milliseconds that a QThread needed to execute one task. Is there any option for this?
Greetings
You'll need to create two signals - one for starting and one for finishing the job. The slot, connected to the start signal, will store the start time like this:
mStartTime = QDateTime::currentDateTime();
and the slot, connected to the finish signal, will count the difference like this:
qint64 msecs = mStartTime.msecsTo(QDateTime::currentDateTime());