diff --git a/src/gameske_funkce.cpp b/src/gameske_funkce.cpp index 57ffa79..3f2d4af 100644 --- a/src/gameske_funkce.cpp +++ b/src/gameske_funkce.cpp @@ -158,6 +158,7 @@ std::string spawncmd() { } void async_clock(WINDOW* win) { + std::this_thread::sleep_for(std::chrono::milliseconds(150)); while (true) { auto now = std::chrono::system_clock::now(); std::string time_str; @@ -186,13 +187,15 @@ void async_clock(WINDOW* win) { } void show_clock_text(WINDOW* text_win) { - std::this_thread::sleep_for(std::chrono::seconds(1)); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); wborder(text_win, 0, ' ', 0, 0, 0, ACS_HLINE, 0, ACS_HLINE); mvwprintw(text_win, 1, 1, "správný čas na podání trestního oznámení je"); wrefresh(text_win); } void async_clock_init() { + // program only launches sometimes i think there is race condition + //memory leak WINDOW* win = newwin(3, 10, LINES - 3, COLS - 10); box(win, 0, 0);