Use of a UUID as a time epoch to determine if the system clock has been reset backwards in time
AssigneeInternational Business Machines Corporation
InventorTheodore Y. Tso
Life of this patent
Estimating the term…
Abstract
A method, system and program are provided for determining if a system clock has been reset backwards in time by using a randomly generated set of bytes (such as a randomly generated or type 4 UUID) as a time epoch. By generating a time epoch at boot time and whenever the system clock is set back in time, an application can compare the time epoch value at an earlier point in its execution, with the current time epoch. If the time epoch values are different, the application will know that the system clock has been set back in time.
Claims20
A method for determining whether a system clock in a data processing system has been set back, comprising:
- generating a first random number and storing the first random number as a time epoch value, where the first random number is generated at least in part from a random number generator;
- generating a second random number when the system clock is set back in time from a previous system clock setting and storing the second random number to update the time epoch value, where the second random number is generated at least in part from a random number generator;
- and
- checking the time epoch value over time to determine from a change in the time epoch value that the system clock has been set back in time.
A computer-usable storage medium embodying computer program code, the computer program code comprising computer executable instructions configured for determining whether a system clock in a data processing system has been set back by:
- generating a first random number and storing the first random number as a time epoch value, where the first random number is generated at least in part from a random number generator;
- generating a second random number when the system clock is set back in time from a previous system clock setting and storing the second random number to update the time epoch value, where the second random number is generated at least in part from a random number generator;
- and
- checking the time epoch value over time to determine from a change in the time epoch value that the system clock has been set back in time.
A data processing system comprising:
- a processor;
- a data bus coupled to the processor;
- and
- a computer-usable medium embodying computer program code, the computer-usable medium being coupled to the data bus, the computer program code comprising instructions executable by the processor and configured for determining whether a system clock in a data processing system has been set back by:
- generating a first random number and storing the first random number as a time epoch value, where the first random number is generated at least in part from a random number generator;
- generating a second random number when the system clock is set back in time from a previous system clock setting and storing the second random number to update the time epoch value, where the second random number is generated at least in part from a random number generator;
- and
- checking the time epoch value over time to determine from a change in the time epoch value that the system clock has been set back in time.
Dependencies are inferred from the claim text.