diff --git a/cpp/ui/ncurses/hw/hwcurses.cpp b/cpp/ui/ncurses/hw/hwcurses.cpp index 5c04f68..9d36b1d 100644 --- a/cpp/ui/ncurses/hw/hwcurses.cpp +++ b/cpp/ui/ncurses/hw/hwcurses.cpp @@ -25,8 +25,8 @@ void myupdatedisplay(const timer &timer_input) { "test: █"); } -std::vector mynumbers = {1, 2, 3, 4, 5, 6, 7, 8, 9}; -std::vector myothernumbers = {1, 4, 9, 8, 6, 2, 3, 5, 7}; +std::vector mynumbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; +std::vector myothernumbers = {4, 9, 8, 6, 2, 1, 10, 3, 5, 7}; void displaynumbers(int startx, int starty, std::vector &input_numbers, cchar_t &input_char) { for (size_t i = 0; i < input_numbers.size(); i++) { @@ -65,7 +65,7 @@ int main() { auto myothersort = std::make_unique(myothernumbers); auto sorttimer = - std::make_unique("sorttimer", 0.1, std::move(myothersort)); + std::make_unique("sorttimer", 0.5, std::move(myothersort)); timermanager mytimermanager; mytimermanager.addtimer(std::move(clocktimer)); @@ -80,7 +80,7 @@ int main() { displaynumbers(10, 10, myothernumbers, my_c_char); refresh(); - std::this_thread::sleep_for(std::chrono::milliseconds(500)); + std::this_thread::sleep_for(std::chrono::milliseconds(50)); } getch(); diff --git a/cpp/ui/ncurses/hw/timer.cpp b/cpp/ui/ncurses/hw/timer.cpp index c48f27a..619ab5f 100644 --- a/cpp/ui/ncurses/hw/timer.cpp +++ b/cpp/ui/ncurses/hw/timer.cpp @@ -9,13 +9,13 @@ #include // infinite timer -timer::timer(std::string name_input, size_t interval_input, +timer::timer(std::string name_input, double interval_input, std::unique_ptr action_input) : time_interval(interval_input), name(name_input), is_infinite(true), action(std::move(action_input)) {} // limited timer -timer::timer(std::string name, size_t interval_input, int triggeramount, +timer::timer(std::string name, double interval_input, int triggeramount, std::unique_ptr action_input) : triggeramount(triggeramount), time_interval(interval_input), name(name), action(std::move(action_input)) {} diff --git a/cpp/ui/ncurses/hw/timer.hpp b/cpp/ui/ncurses/hw/timer.hpp index 12bebc5..8bd4cfa 100644 --- a/cpp/ui/ncurses/hw/timer.hpp +++ b/cpp/ui/ncurses/hw/timer.hpp @@ -39,12 +39,12 @@ public: //infinite timer - timer(std::string name_input, size_t interval_input, + timer(std::string name_input, double interval_input, std::unique_ptr action_input ); //limited timer - timer(std::string name, size_t interval_input, int triggeramount, + timer(std::string name, double interval_input, int triggeramount, std::unique_ptr action ); // callbackfunc once enough time has accumulated