mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-21 16:33:24 +00:00
Refactor timer in framework
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
8d6915d0e6
commit
748a92d278
@ -2,14 +2,12 @@
|
||||
|
||||
//! Timer.
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
use crate::arch::x86::timer::{add_timeout_list, TimerCallback, TICK};
|
||||
use crate::sync::SpinLock;
|
||||
use crate::{config::TIMER_FREQ, prelude::*};
|
||||
use crate::arch::timer::{add_timeout_list, TimerCallback, TICK};
|
||||
use crate::prelude::*;
|
||||
use crate::{arch::timer::TIMER_FREQ, sync::SpinLock};
|
||||
use core::{sync::atomic::Ordering, time::Duration};
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
pub use crate::arch::x86::timer::read_monotonic_milli_seconds;
|
||||
pub use crate::arch::timer::read_monotonic_milli_seconds;
|
||||
|
||||
/// A timer invokes a callback function after a specified span of time elapsed.
|
||||
///
|
||||
|
Reference in New Issue
Block a user