You are not logged in.

1

Monday, June 22nd 2015, 11:58pm

Simple stopwatch to time some code?

What's the simplest way to measure the amount of time a piece of code takes using QTimer? I just want to time the code and convert it to text to output to a message box. Thanks in advance for any help.

slevon

Trainee

Posts: 92

Location: Germany

Occupation: electrical engineer

  • Send private message

2

Wednesday, July 1st 2015, 9:34am

Hello,
may I suggest to use QElapsedTimer, which its main function is to measure code-execution-time.

Hope this helps,
slevon