diff --git a/src/interface.rs b/src/interface.rs index 42b3a57..7a265c2 100644 --- a/src/interface.rs +++ b/src/interface.rs @@ -158,7 +158,7 @@ pub async fn initiate_coinjoin( /// /// # Arguments /// * `back` - how many second back look in the past -/// * `timeout` - how many microseconds we will wait before fetching relay notifications +/// * `timeout` - how many milliseconds we will wait before fetching relay notifications /// * `relay` - the relay url, must start w/ `wss://` or `ws://` /// /// # Returns a [`Vec`] of [`String`] containing a json serialization of a [`Pool`] @@ -176,7 +176,7 @@ pub async fn list_pools( // subscribe to 2020 event up to 1 day back in time pool_listener.subscribe_pools(back).await.unwrap(); - sleep(Duration::from_micros(timeout)).await; + sleep(Duration::from_millis(timeout)).await; while let Some(pool) = pool_listener.receive_pool_notification()? { let str = serde_json::to_string(&pool)?;