Method and apparatus for synchronizing an imprecise time clock maintained by a computer system
First Claim
1. A method of synchronizing a local clock maintained by a computer system, the method comprising:
- in response to a transition of the local clock, calling a local timing routine for generating time readings at a precision greater than a precision of the local clock, to obtain a first time reading;
requesting, from a remote server on a network, a second time reading corresponding to a current time and based on a server clock maintained by the remote server having a precision greater than the precision of the local clock;
upon receiving the second time reading, calling the local timing routine to obtain a third time reading at a level of precision greater than the precision of the local clock;
determining a delay associated with accessing the remote server based on the first and third time readings;
adjusting the second time reading based on the delay;
estimating, based on the adjusted second time reading, an amount of time until a next transition of the server clock at the level of precision of the local clock;
after waiting for said amount of time, incrementing the adjusted second time reading by the least significant increment of the local clock; and
setting the local clock based on the incremented adjusted second time reading.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus are provided for performing need based synchronization of a time clock maintained by a computer system. A number of computer systems are connected to a network, such as the Internet. Each computer system synchronizes its time clock by accessing a time server via the network. The time server may service a large number of client computer systems for purposes of providing accurate time of day readings and may therefore be subject to substantial loading. Accordingly, in each client system, the time clock is synchronized at least twice, and an amount of drift in the time clock is determined based on the two or more synchronizations. The synchronization interval for future synchronizations of the clock or the specific time of the next synchronization is then determined based upon the amount of drift, such that the time clock of each client computer system is synchronized only when necessary, and such that the loading on the time server is reduced. When the time clock is imprecise relative to that of the time server, the clock may be synchronized by obtaining time readings from a local precision timing routine to quantify network delays associated with accessing the server. The delays are then used to adjust the value returned by the time server to increase the accuracy of the local clock.
111 Citations
10 Claims
-
1. A method of synchronizing a local clock maintained by a computer system, the method comprising:
-
in response to a transition of the local clock, calling a local timing routine for generating time readings at a precision greater than a precision of the local clock, to obtain a first time reading; requesting, from a remote server on a network, a second time reading corresponding to a current time and based on a server clock maintained by the remote server having a precision greater than the precision of the local clock; upon receiving the second time reading, calling the local timing routine to obtain a third time reading at a level of precision greater than the precision of the local clock; determining a delay associated with accessing the remote server based on the first and third time readings; adjusting the second time reading based on the delay; estimating, based on the adjusted second time reading, an amount of time until a next transition of the server clock at the level of precision of the local clock; after waiting for said amount of time, incrementing the adjusted second time reading by the least significant increment of the local clock; and setting the local clock based on the incremented adjusted second time reading. - View Dependent Claims (2)
-
-
3. A method of synchronizing an imprecise clock maintained by a computer system, the imprecise clock having a first level of precision, the method comprising:
-
waiting for a transition to occur in a least significant digit of the imprecise clock; in response to the transition, calling a local timing routine for generating time readings at a second level of precision greater than the first level of precision, to obtain a first time reading at the second level of precision; accessing a time server via a network to request a second time reading corresponding to a current time of day, the time server maintaining a precise clock having the second level of precision; upon receiving a response to the request, including the second time reading, calling the local timing routine to obtain a third time reading at the second level of precision; determining a delay associated with accessing the time server based on the first time reading and the third time reading; adjusting the second time reading received from the time server based on the delay to produce a fourth time reading; estimating, based on the fourth time reading, an amount of time until the occurrence of a next transition of a digit of the precise clock corresponding to the least significant digit of the imprecise clock; after waiting for said amount of time, increasing by one the digit of the fourth time reading corresponding to the least significant digit of the imprecise clock, to generate a fifth time reading; and setting the imprecise clock to match the fifth time reading. - View Dependent Claims (4)
-
-
5. A device for synchronizing an imprecise clock maintained by a computer system, the imprecise clock having a first level of precision, the device comprising:
-
means for waiting for a transition to occur in a least significant digit of the imprecise clock; means for calling, in response to the transition, a local timing routine for generating time readings at a second level of precision greater than the first level of precision, to obtain a first time reading at the second level of precision; means for accessing a time server via a network to request a second time reading corresponding to a current time of day, the time server maintaining a precise clock having the second level of precision; means for calling the local timing routine, upon receiving a response to the request including the second time reading, to obtain a third time reading at the second level of precision; means for determining a delay associated with accessing the time server based on the first time reading and the third time reading; means for adjusting the second time reading received from the time server based on the delay to produce a fourth time reading; means for estimating, based on the fourth time reading, an amount of time until the occurrence of a next transition of a digit of the precise clock corresponding to the least significant digit of the imprecise clock; means for increasing by one the digit of the fourth time reading corresponding to the least significant digit of the imprecise clock, after waiting for said amount of time, to generate a fifth time reading; and means for setting the imprecise clock to match the fifth time reading. - View Dependent Claims (6)
-
-
7. A computer system comprising:
-
a processor; a communication device coupled to the processor for enabling the computer system to communicate on a network; and a storage device coupled to the processor, the storage device having instructions stored therein which configure the processor to; in response to a transition of the local clock, call a local timing routine for generating time readings at a precision greater than a precision of the local clock, to obtain a first time reading; to request, from a remote server on a network, a second time reading corresponding to a current time and based on a server clock maintained by the remote server having a precision greater than the precision of the local clock; upon receiving the second time reading, call the local timing routine to obtain a third time reading at a level of precision greater than the precision of the local clock; determine a delay associated with accessing the remote server based on the first and third time readings; adjust the second time reading based on the delay; estimate, based on the adjusted second time reading, an amount of time until a next transition of the server clock at the level of precision of the local clock; after waiting for said amount of time, increment the adjusted second time reading by the least significant increment of the local clock; and set the local clock based on the incremented adjusted second time reading. - View Dependent Claims (8)
-
-
9. A data signal embodied in a propagation medium, the data signal representing a plurality of instructions which, when executed on a computer system, cause the computer system to:
-
in response to a transition of the local clock, call a local timing routine for generating time readings at a precision greater than a precision of the local clock, to obtain a first time reading; request, from a remote server on a network, a second time reading corresponding to a current time and based on a server clock maintained by the remote server having a precision greater than the precision of the local clock; upon receiving the second time reading, call the local timing routine to obtain a third time reading at a level of precision greater than the precision of the local clock; determine a delay associated with accessing the remote server based on the first and third time readings; adjust the second time reading based on the delay; estimate, based on the adjusted second time reading, an amount of time until a next transition of the server clock at the level of precision of the local clock; after waiting for said amount of time, increment the adjusted second time reading by the least significant increment of the local clock; and set the local clock based on the incremented adjusted second time reading. - View Dependent Claims (10)
-
Specification