diff options
-rw-r--r-- | host_epoch.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/host_epoch.cpp b/host_epoch.cpp index 99cdf6d..8415f15 100644 --- a/host_epoch.cpp +++ b/host_epoch.cpp @@ -87,6 +87,14 @@ void HostEpoch::onOwnerChanged(Owner owner) offset = microseconds(0); saveOffset(); } + else + { + // In SPLIT, need to re-calculate the diff between + // host and steady time + auto steadyTime = duration_cast<microseconds>( + steady_clock::now().time_since_epoch()); + diffToSteadyClock = getTime() - steadyTime; + } } void HostEpoch::saveOffset() |