MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / SetTimeRemaining

Method SetTimeRemaining

lib/utils/duration.cpp:103–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void Duration::SetTimeRemaining(double remaining)
104{
105 long long msPassed = (long long)((Seconds() - remaining) * 1000);
106 _startTime = std::chrono::high_resolution_clock::now() -
107 std::chrono::milliseconds(msPassed);
108}
109
110void Duration::Reset()
111{

Callers 4

LoadMethod · 0.45
ContinueMethod · 0.45
PerformActionMethod · 0.45

Calls 1

nowClass · 0.85

Tested by

no test coverage detected