amd64: add time system
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
bb71cfd98f
commit
36145eafbc
9 changed files with 179 additions and 2 deletions
|
|
@ -10,6 +10,7 @@ extern struct limine_hhdm_response *kern_hhdm_res;
|
|||
extern struct limine_rsdp_response *kern_rsdp_res;
|
||||
extern struct limine_module_response *module_res;
|
||||
extern struct limine_framebuffer_response *fb_res;
|
||||
extern struct limine_tsc_frequency_response *tsc_res;
|
||||
|
||||
void requests_init();
|
||||
|
||||
|
|
|
|||
17
include/kernel/time.h
Normal file
17
include/kernel/time.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _TIME_H_
|
||||
#define _TIME_H_
|
||||
|
||||
#include <kernel/types.h>
|
||||
|
||||
struct timespec {
|
||||
i64 tv_sec;
|
||||
i64 tv_nsec;
|
||||
};
|
||||
|
||||
time_t arch_get_real_time();
|
||||
u64 tsc_calibrate();
|
||||
u64 rdtsc();
|
||||
struct timespec get_realtime();
|
||||
|
||||
#endif /* _TIME_H_ */
|
||||
Loading…
Reference in a new issue