• highball@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 day ago

    CPU interrupts. There are timer interrupts that can be used for this. In hibernate, only a tiny fraction of the CPU is changing the transistor states. A transistor only uses power when it changes state; i.e. “off” or Hibernate. Transistor state changes when you cycle the clock on a CPU. Anyways, set the register for the timer interrupt and signal the CPU for Hibernate. The timer circuit is still listening to the clock while the rest of the CPU stops listening to the clock. Each clock cycle you subtract one from the register. When the register reaches zero, the timer interrupt wakes the rest of the CPU. Just like moving your mouse or pressing the power button; they signal an interrupt which wakes the CPU.