interval was being ignored because of type error
size_t interval should've been a double, but was being implicitly converted, so it worked, compiled. but not like I intended.
This commit is contained in:
@@ -25,8 +25,8 @@ void myupdatedisplay(const timer &timer_input) {
|
||||
"test: █");
|
||||
}
|
||||
|
||||
std::vector<int> mynumbers = {1, 2, 3, 4, 5, 6, 7, 8, 9};
|
||||
std::vector<int> myothernumbers = {1, 4, 9, 8, 6, 2, 3, 5, 7};
|
||||
std::vector<int> mynumbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
|
||||
std::vector<int> myothernumbers = {4, 9, 8, 6, 2, 1, 10, 3, 5, 7};
|
||||
|
||||
void displaynumbers(int startx, int starty, std::vector<int> &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<sortaction>(myothernumbers);
|
||||
auto sorttimer =
|
||||
std::make_unique<timer>("sorttimer", 0.1, std::move(myothersort));
|
||||
std::make_unique<timer>("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();
|
||||
|
||||
Reference in New Issue
Block a user