blob: f45e4ea6fc09e5c567396c705a6a1b8c189c12b7 [file] [edit]
// Licensed under the Apache-2.0 license
// SPDX-License-Identifier: Apache-2.0
#![allow(dead_code)]
/// Returns the current system clock time in ticks.
///
/// If `clock-earlgrey` feature is enabled, it queries the Earlgrey timer.
/// Otherwise, it returns 0.
#[cfg(feature = "clock-earlgrey")]
pub fn now_ticks() -> u64 {
earlgrey_util::clock::now_ticks()
}
/// Returns the current system clock time in ticks.
///
/// If `clock-earlgrey` feature is enabled, it queries the Earlgrey timer.
/// Otherwise, it returns 0.
#[cfg(not(feature = "clock-earlgrey"))]
pub fn now_ticks() -> u64 {
0
}