Skip to content

Commit

Permalink
modify dice seed to use epoch time
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufmte committed Sep 12, 2022
1 parent 1996113 commit f00d779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/displayapp/screens/Dice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static void btnRollEventHandler(lv_obj_t* obj, lv_event_t event) {

Dice::Dice(DisplayApp* app, Controllers::DateTime& dateTime) : Screen(app), dateTime {dateTime} {

srand(dateTime.Uptime().count() * dateTime.Seconds());
srand(dateTime.Uptime().count() * time(nullptr));

lv_obj_t* dLabel = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_font(dLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
Expand Down

0 comments on commit f00d779

Please sign in to comment.