Skip to content

Unrolled timer #62

@fengb

Description

@fengb

Followup to #61

Certain components never require the fastest clock. The most obvious offenders are the timer interrupt and temportal.

What if we unroll the timer mechanism?

fn tick8() void {
    // 8 times per function call
    inline for ("12345678") |_| {
        self.timer.tick();
        self.cpu.tick();
        self.video.tick();
        self.audio.tick();
    }

    // 1 time per function call
    self.slow_timer.tick();
    self.temportal.tick();
    self.serial.tick();
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions