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

Method TimeRemaining

lib/utils/duration.cpp:89–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89double Duration::TimeRemaining() const
90{
91 if (IsReset()) {
92 return Seconds();
93 }
94 auto runTime = std::chrono::duration_cast<std::chrono::milliseconds>(
95 std::chrono::high_resolution_clock::now() - _startTime);
96
97 if (runTime.count() >= Milliseconds()) {
98 return 0;
99 }
100 return (Milliseconds() - runTime.count()) / 1000.0;
101}
102
103void Duration::SetTimeRemaining(double remaining)
104{

Callers 4

CheckConditionMethod · 0.80
SaveMethod · 0.80
PauseMethod · 0.80
UpdateTimeRemainingMethod · 0.80

Calls 2

nowClass · 0.85
countMethod · 0.80

Tested by

no test coverage detected