diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-01-11 19:36:46 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-01-12 11:25:51 +0100 |
commit | 6edc0cf5ab2fce211318b5d4f83e319897b621e5 (patch) | |
tree | c79d3dbe9e3bd3fd7f899ce5eb8d924df6c1e506 /Userland/Applications/SystemMonitor/main.cpp | |
parent | a8cf0c9371f7ba500cc4920889bc06d78623e980 (diff) | |
download | serenity-6edc0cf5ab2fce211318b5d4f83e319897b621e5.zip |
LibCore+Userland: Don't auto-start new Core::Timers
This was unintuitive, and only useful in a few cases. In the majority,
users had to immediately call `stop()`, and several who did want the
timer started would call `start()` on it immediately anyway. Case in
point: There are only two places I had to add a manual `start()`.
Diffstat (limited to 'Userland/Applications/SystemMonitor/main.cpp')
-rw-r--r-- | Userland/Applications/SystemMonitor/main.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index e01aa4f254..e1b110d38c 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -328,6 +328,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) }; update_stats(); auto& refresh_timer = window->add<Core::Timer>(frequency * 1000, move(update_stats)); + refresh_timer.start(); auto selected_id = [&](ProcessModel::Column column) -> pid_t { if (process_table_view.selection().is_empty()) |