iceyee_sleep/lib.rs
1// **************************************************
2// * Author: Iceyee *
3// * Mail: iceyee.studio@qq.com *
4// * Git: https://github.com/iceyee *
5// **************************************************
6//
7// Use.
8
9//! 延时.
10
11use std::time::Duration;
12use tokio::time::Sleep;
13
14// Enum.
15
16// Trait.
17
18// Struct.
19
20// Function.
21
22/// 延时.
23pub async fn sleep(t: usize) -> Sleep {
24 return tokio::time::sleep(Duration::from_millis(t as u64));
25}