33 lines
624 B
C
33 lines
624 B
C
|
#pragma once
|
||
|
#include <Types.h>
|
||
|
|
||
|
extern const usize ARCH_TIMER_FREQ; // How many timer ticks in one millisecond?
|
||
|
|
||
|
static const usize MS_PER_SECOND = 1000;
|
||
|
static const usize US_PER_SECOND = MS_PER_SECOND * 1000;
|
||
|
static const usize NS_PER_SECOND = US_PER_SECOND * 1000;
|
||
|
|
||
|
namespace Timer
|
||
|
{
|
||
|
void tick();
|
||
|
|
||
|
usize raw_ticks();
|
||
|
|
||
|
usize ticks();
|
||
|
usize ticks_ms();
|
||
|
usize ticks_us();
|
||
|
usize ticks_ns();
|
||
|
|
||
|
usize boot();
|
||
|
usize boot_ms();
|
||
|
usize boot_us();
|
||
|
usize boot_ns();
|
||
|
|
||
|
usize clock();
|
||
|
usize clock_ms();
|
||
|
usize clock_us();
|
||
|
usize clock_ns();
|
||
|
|
||
|
void arch_init();
|
||
|
void init();
|
||
|
}
|