MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / current_time_millis

Function current_time_millis

mserver/MasterService/src/main.rs:296–301  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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
300fn 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")

Callers 1

run_serverFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected