mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
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()`.
This commit is contained in:
parent
a8cf0c9371
commit
6edc0cf5ab
10 changed files with 12 additions and 8 deletions
|
@ -329,6 +329,7 @@ static bool prompt_to_stop_profiling(pid_t pid, DeprecatedString const& process_
|
|||
auto update_timer = Core::Timer::construct(100, [&] {
|
||||
timer_label.set_text(DeprecatedString::formatted("{:.1} seconds", static_cast<float>(clock.elapsed()) / 1000.0f));
|
||||
});
|
||||
update_timer->start();
|
||||
|
||||
auto& stop_button = widget->add<GUI::Button>("Stop");
|
||||
stop_button.set_fixed_size(140, 22);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue