lets suppose your while loop runs for 100 iterations at one particular call.

i guess that those 100 iterations would be completed in less than 2 secs. So you will be out of your loop before the timer can call the mark() for first time...

print the current time at end of Monitor::quickSearch() and print the time at the beginning of mark().