Add the timer section of LoongArch in OSTD

This commit is contained in:
王英泰 2025-07-08 17:24:01 +08:00 committed by Tate, Hongliang Tian
parent 93c562f5d2
commit b5c3eb8be8
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
// SPDX-License-Identifier: MPL-2.0
//! The timer support.
/// The timer frequency (Hz). Here we choose 1000Hz since 1000Hz is easier for
/// unit conversion and convenient for timer. What's more, the frequency cannot
/// be set too high or too low, 1000Hz is a modest choice.
///
/// For system performance reasons, this rate cannot be set too high, otherwise
/// most of the time is spent executing timer code.
pub const TIMER_FREQ: u64 = 1000;