0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-24 06:58:22 -05:00

Compare commits

..

1 Commits

Author SHA1 Message Date
neon_arch
a9349c284b
Merge 3d082bfa68 into 959d0c52b1 2024-10-06 16:30:48 +00:00

View File

@ -85,7 +85,7 @@ pub async fn search(
let next_page = page + 1; let next_page = page + 1;
// Add a random delay before making the request. // 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 nanos = SystemTime::now().duration_since(UNIX_EPOCH)?.subsec_nanos() as f32;
let delay = ((nanos / 1_0000_0000 as f32).floor() as u64) + 1; let delay = ((nanos / 1_0000_0000 as f32).floor() as u64) + 1;
tokio::time::sleep(Duration::from_secs(delay)).await; tokio::time::sleep(Duration::from_secs(delay)).await;