()
| 294 | match socket_addr.ip() { |
| 295 | IpAddr::V4(_) => format!("http://{socket_addr}"), |
| 296 | IpAddr::V6(_) => format!("http://[{}]:{}", socket_addr.ip(), socket_addr.port()), |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | fn current_time_millis() -> Result<i64> { |
| 301 | let duration = std::time::SystemTime::now() |
| 302 | .duration_since(std::time::UNIX_EPOCH) |
| 303 | .context("reading current time for dev seed")?; |
| 304 | i64::try_from(duration.as_millis()).context("converting current time to milliseconds") |