notecrumbs

a nostr opengraph server build on nostrdb and egui
git clone git://jb55.com/notecrumbs
Log | Files | Refs | README | LICENSE

timeout.rs (249B)


      1 use std::time::Duration;
      2 
      3 pub fn get_env_timeout() -> Duration {
      4     let timeout_env = std::env::var("TIMEOUT_MS").unwrap_or("2000".to_string());
      5     let timeout_ms: u64 = timeout_env.parse().unwrap_or(2000);
      6     Duration::from_millis(timeout_ms)
      7 }