summaryrefslogtreecommitdiff
path: root/Userland/Games/Solitaire
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-01-11 16:20:17 +0000
committerAndreas Kling <kling@serenityos.org>2023-01-12 11:25:51 +0100
commita15d44f019dc60b001c565ce0b940cc87024dbfd (patch)
tree173e3568bff54713fbe7444fd20eada916287f5e /Userland/Games/Solitaire
parent1d4f287582f43acfd76661d20bc2915455809f41 (diff)
downloadserenity-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.cpp4
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;