diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-01-11 16:20:17 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-01-12 11:25:51 +0100 |
commit | a15d44f019dc60b001c565ce0b940cc87024dbfd (patch) | |
tree | 173e3568bff54713fbe7444fd20eada916287f5e /Userland/Games/Solitaire | |
parent | 1d4f287582f43acfd76661d20bc2915455809f41 (diff) | |
download | serenity-a15d44f019dc60b001c565ce0b940cc87024dbfd.zip |
LibCore+Userland: Make Core::Timer::create_repeating() return ErrorOr
The FIXMEs must flow!
Diffstat (limited to 'Userland/Games/Solitaire')
-rw-r--r-- | Userland/Games/Solitaire/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Games/Solitaire/main.cpp b/Userland/Games/Solitaire/main.cpp index 62a3bc3adf..d56a978870 100644 --- a/Userland/Games/Solitaire/main.cpp +++ b/Userland/Games/Solitaire/main.cpp @@ -111,7 +111,7 @@ 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; uint64_t hours = seconds_elapsed / 3600; @@ -119,7 +119,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) uint64_t seconds = seconds_elapsed % 60; statusbar.set_text(2, DeprecatedString::formatted("Time: {:02}:{:02}:{:02}", hours, minutes, seconds)); - }); + })); game.on_game_start = [&]() { seconds_elapsed = 0; |