/// Get the WebSocket latency.
///
/// If the client sent a heartbeat and did not receive it back, the function will sleep
/// for `150` milliseconds and try again.
Get the WebSocket latency.
If the client sent a heartbeat and did not receive it back, the function will sleep
for `150` milliseconds and try again.
Get the WebSocket latency . If the client sent a heartbeat and did not receive it back the function will sleep for ` 150 ` milliseconds and try again .
pub async fn latency(&self) -> Duration {
        loop {
            match self.messenger.latency().await {
                Some(latency) => return latency,
                None => {
                    sleep(Duration::from_millis(150)).await;
                    continue;
                }
            };
        }
    }
pub async fn latency ( & self ) -> Duration { loop { match self . messenger . latency ( ) . await { Some ( latency ) => return latency , None => { sleep ( Duration :: from_millis ( 150 ) ) . await ; continue ; } } ; } }
Get the WebSocket latency.
Get the WebSocket latency .
&self