MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / update

Method update

src/host/settings/settings_saver.cpp:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 debounce_s_{debounce_s} {}
37
38void SettingsSaver::update(const AppSettings& live, double now_s) {
39 if (!(live == current_)) {
40 current_ = live;
41 dirty_ = true;
42 }
43 if (dirty_ && now_s - last_save_s_ >= debounce_s_) {
44 save_(current_);
45 dirty_ = false;
46 last_save_s_ = now_s;
47 }
48}
49
50void SettingsSaver::flush() {
51 if (dirty_) {

Callers 1

renderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected