qubit_clock/sleep/sleeper.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026 Haixing Hu.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10use std::time::Duration;
11
12/// Provides blocking relative sleep operations.
13pub trait Sleeper: Send + Sync {
14 /// Blocks the current thread for the specified duration.
15 ///
16 /// # Arguments
17 ///
18 /// * `duration` - The relative duration to sleep.
19 fn sleep_for(&self, duration: Duration);
20}