1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:47:35 +00:00

LibCore+Userland: Make Core::Timer::create_repeating() return ErrorOr

The FIXMEs must flow!
This commit is contained in:
Sam Atkins 2023-01-11 16:20:17 +00:00 committed by Andreas Kling
parent 1d4f287582
commit a15d44f019
12 changed files with 19 additions and 17 deletions

View file

@ -158,11 +158,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
uint64_t seconds_elapsed = 0;
auto timer = Core::Timer::create_repeating(1000, [&]() {
auto timer = TRY(Core::Timer::create_repeating(1000, [&]() {
++seconds_elapsed;
statusbar.set_text(2, DeprecatedString::formatted("Time: {}", format_seconds(seconds_elapsed)));
});
}));
game.on_game_start = [&]() {
seconds_elapsed = 0;