Patent ID: 7921319

Claim:
A method for providing a virtual clock on an operational computer having one program executing, comprising: reading p, a period in number of user instructions; computing, before a first period of execution of the program, A 0 , an initial average duration of one instruction using a sample of user instruction executed read from a user instruction count (uic) of the operational computer; reading R 0 , the system clock value at starting of the execution of the program; computing a virtual clock value V(x) corresponding to a given number of user instructions x already executed in the program inside the first period (0≦x<p),V 0 (x)=A 0 *x+R 0 , x being read from the uic of the operational computer; at the end of each nth period (counting from the first period where n=1), computing the virtual clock value V n−1 (np), reading the system clock value (R n ) and computing a new value of the average duration of an instruction, A n , as a function of R n , R n−1 and V n−1 (np) so that at the end of the nth period, the difference between the virtual clock value and the system clock value is minimal; for a x value of the uic corresponding to any given number of user instructions x already executed in the program inside a nth period (starting from the first period where n=1) n*p≦x≦(n+1)*p), computing the virtual clock value V n (x)=A n *(x−n*p)+V n−1 (np).