MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / current_drift_ms

Method current_drift_ms

src/geode/basic/uuid.cpp:65–70  ·  view source on GitHub ↗

Diagnostic: virtual clock drift in milliseconds (+ = ahead, - = behind)

Source from the content-addressed store, hash-verified

63 // Diagnostic: virtual clock drift in milliseconds (+ = ahead, - =
64 // behind)
65 [[nodiscard]] static std::int64_t current_drift_ms()
66 {
67 auto real_ms = absl::ToUnixMillis( absl::Now() );
68 auto state_ms = g_state.load( std::memory_order_acquire ) >> 16;
69 return static_cast< std::int64_t >( state_ms ) - real_ms;
70 }
71
72 private:
73 // Tuning parameters

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected