MCPcopy Create free account
hub / github.com/AI45Lab/Code / now_epoch_ms

Function now_epoch_ms

core/src/mcp/manager.rs:424–429  ·  view source on GitHub ↗

Wall-clock now() in Unix epoch milliseconds. Used internally by the activity-tracking + idle-disconnect path. Kept as a free function (rather than going through `HostEnv`) because the MCP manager predates host_env wiring and the host's `Clock` impl is not yet threaded into the manager.

()

Source from the content-addressed store, hash-verified

422/// predates host_env wiring and the host's `Clock` impl is not yet
423/// threaded into the manager.
424fn now_epoch_ms() -> u64 {
425 std::time::SystemTime::now()
426 .duration_since(std::time::UNIX_EPOCH)
427 .map(|d| d.as_millis() as u64)
428 .unwrap_or(0)
429}
430
431/// Convert MCP tool result to string output
432pub fn tool_result_to_string(result: &CallToolResult) -> String {

Callers 4

do_connectMethod · 0.70
touchMethod · 0.70
disconnect_idleMethod · 0.70
call_toolMethod · 0.70

Calls 1

nowFunction · 0.85

Tested by

no test coverage detected