mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-22 11:13:22 +00:00
添加rust重构版本的HPET驱动和tsc驱动,并使用HPET校准tsc频率和cpu总线频率 (#412)
* 添加rust重构版本的HPET驱动和tsc驱动,并使用HPET校准tsc频率和cpu总线频率 * 把hpet.c移动到arch文件夹下
This commit is contained in:
@ -370,3 +370,8 @@ impl Into<smoltcp::time::Duration> for Duration {
|
||||
smoltcp::time::Duration::from_millis(self.millis())
|
||||
}
|
||||
}
|
||||
|
||||
pub trait TimeArch {
|
||||
/// Get CPU cycles (Read from register)
|
||||
fn get_cycles() -> usize;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <common/glib.h>
|
||||
#include <driver/timers/HPET/HPET.h>
|
||||
|
||||
|
||||
// 定义LONG_MAX为最大超时时间 - 允许负数
|
||||
|
Reference in New Issue
Block a user