How to measure function running time in Qt?
问题 I am calling argon2 - memory intensive hashing function in Qt and measuring its running time: ... QTime start = QTime::currentTime(); // call hashing function QTime finish = QTime::currentTime(); time = start.msecsTo(finish) / 1000.0; ... In argon2 library's test case, time is measured in another way: ... clock_t start = clock(); // call hashing function clock_t finish = clock(); time = ((double)finish - start) / CLOCKS_PER_SEC; ... I am calling the function exactly as they call in their test