1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:17:35 +00:00

Userland: Use Core::Timer::create_foo() factory functions where possible

This commit is contained in:
Sam Atkins 2023-01-11 20:00:46 +00:00 committed by Andreas Kling
parent 6edc0cf5ab
commit e181b1cb82
12 changed files with 37 additions and 51 deletions

View file

@ -22,11 +22,9 @@ namespace PixelPaint {
SprayTool::SprayTool()
{
m_timer = Core::Timer::construct();
m_timer->on_timeout = [&]() {
m_timer = Core::Timer::create_repeating(200, [&]() {
paint_it();
};
m_timer->set_interval(200);
}).release_value_but_fixme_should_propagate_errors();
}
static double nrand()