MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SetTime

Method SetTime

src/framerate_gui.cpp:429–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427 }
428
429 inline void SetTime(double value, double target)
430 {
431 const double threshold_good = target / 3;
432 const double threshold_bad = target;
433 this->value = (uint32_t)(value * 100);
434 this->strid = (value < threshold_good) ? STR_FRAMERATE_MS_GOOD : (value > threshold_bad) ? STR_FRAMERATE_MS_BAD : STR_FRAMERATE_MS_WARN;
435 }
436
437 inline uint32_t GetValue() const { return this->value; }
438 inline uint32_t GetDecimals() const { return 2; }

Callers 1

UpdateDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected