Patent ID: 7409574

Claim:
A method for determining if a measurement of an elapsed time for an execution of a software routine in a computer system is valid, the software routine having a maximum elapsed time, the computer system including a first processor and a second processor, each of the first and second processors including a clock, the method comprising the steps of: modifying a value of the clock of the second processor so that a difference between a value of the clock of the first processor and the value of the clock of the second processor is larger than the maximum elapsed time, the difference between the value of the clock of the first processor and the value of the clock of the second processor being a clock skew; commencing execution of the software routine on an initial execution processor, the initial execution processor being one of the first or second processors; obtaining a start time as a value of the clock of the initial execution processor; completing execution of the software routine on a completing execution processor, the completing execution processor being one of the first or second processors; obtaining an end time as a value of the clock of the completing execution processor; calculating an elapsed time as a difference between the start time and the end time; determining whether the elapsed time is valid by checking for a positive value of the elapsed time and comparing the value of the elapsed time with the clock skew.