Luna/kernel/src/arch/Timer.h
apio 3283991ec6
All checks were successful
continuous-integration/drone/push Build is passing
kernel: Keep the old Timer::ticks_ms() API.
Removing this API broke the ATA branch.
2023-06-03 21:02:18 +02:00

30 lines
530 B
C++

#pragma once
#include <bits/timespec.h>
#include <luna/Types.h>
#ifdef ARCH_X86_64
#include "arch/x86_64/Timer.h"
#else
#error "Unknown architecture."
#endif
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 ticks_ms();
struct timespec* monotonic_clock();
struct timespec* realtime_clock();
void arch_init();
void init();
}
bool should_invoke_scheduler();