1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// SPDX-FileCopyrightText: 2026 Roman Valls Guimera <brainstorm@nopcode.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
//! Timer operations trait.
use Future;
/// Timer hardware abstraction.
///
/// Provides time measurement and delays. Implementations typically wrap
/// system tick timers or RTOS timer facilities.
///
/// # Example
///
/// ```ignore
/// async fn measure_time<T: TimerHal>(timer: &T) -> u64 {
/// let start = timer.now_millis();
/// some_operation().await;
/// timer.now_millis() - start
/// }
/// ```