mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-23 22:48:21 -05:00
Compare commits
2 Commits
a9349c284b
...
933134361f
Author | SHA1 | Date | |
---|---|---|---|
|
933134361f | ||
|
42c30aaaba |
@ -85,7 +85,7 @@ pub async fn search(
|
||||
let next_page = page + 1;
|
||||
|
||||
// Add a random delay before making the request.
|
||||
if config.aggregator.random_delay || !config.debug {
|
||||
if config.aggregator.random_delay || config.debug {
|
||||
let nanos = SystemTime::now().duration_since(UNIX_EPOCH)?.subsec_nanos() as f32;
|
||||
let delay = ((nanos / 1_0000_0000 as f32).floor() as u64) + 1;
|
||||
tokio::time::sleep(Duration::from_secs(delay)).await;
|
||||
|
Loading…
Reference in New Issue
Block a user