主权项 |
1. An apparatus comprising:
a power supply for producing power, a first processor powered by the power supply; a first time-storage circuit coupled to the first processor, wherein the first processor periodically reads a first-real-time-clock time from a first real-time clock and stores the first-real-time-clock time in the first time-storage circuit; a first power-monitoring circuit coupled to the first processor, wherein the first power-monitoring circuit stores energy when a first power-being-monitored is producing power and dissipates energy at a first predictable rate when the first power-being-monitored is not producing power; wherein the first processor is programmed to:
upon recovery from a reset, read from the first power-monitoring circuit the energy stored by the first power-monitoring circuit,determine from the first stored energy reading a first power-out length of time that the first power-being-monitored was not producing power,determine that the first power-out length of time is less than a first threshold length of time, andset a first processor time to the first-real-time-clock time stored in the first time-storage circuit plus the first power-out length of time. |