Refact. Replace all tokio::time::interval() (#7173)

* Refact. Replace all `tokio::time::interval()`

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* Refact Better min_interval for `ThrottledInterval`.

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-02-18 21:18:00 +08:00
committed by GitHub
parent 5fdcc748e1
commit 8c108065eb
9 changed files with 153 additions and 39 deletions

View File

@@ -116,6 +116,7 @@ mod test {
host: "server.example.net".to_owned(),
key: "".to_owned(),
api: "".to_owned(),
relay: "".to_owned(),
}
);
assert_eq!(
@@ -124,6 +125,7 @@ mod test {
host: "server.example.net".to_owned(),
key: "".to_owned(),
api: "".to_owned(),
relay: "".to_owned(),
}
);
// key in these tests is "foobar.,2" base64 encoded
@@ -136,6 +138,7 @@ mod test {
host: "server.example.net".to_owned(),
key: "Zm9vYmFyLiwyCg==".to_owned(),
api: "abc".to_owned(),
relay: "".to_owned(),
}
);
assert_eq!(
@@ -145,6 +148,7 @@ mod test {
host: "server.example.net".to_owned(),
key: "Zm9vYmFyLiwyCg==".to_owned(),
api: "".to_owned(),
relay: "".to_owned(),
}
);
}