Looks like you want some time based scheduling which makes sure that algorithm doe not run for more than X seconds. or may you just want to measure the time consumed by each algorithm. In either cases QTimer will not help, you have use QTimeThe thing is that I need them because I test my algorithms performances for some research and they all have a computational budget of X seconds. So I need QTimers for each to use that precise amount of time and not more...Qt Code:
QTime t; t.start(); some_lengthy_task(); qDebug("Time elapsed: %d ms", t.elapsed());To copy to clipboard, switch view to plain text mode
Bookmarks