+ 1

How can I make a price of Code Run every second

To clarify, I'm trying to Construct a Hockey Game, and I need to know how i can make a clock that will run down by one every second rather than it running down to zero when i immediately press run. I need to loop the code once every second, but i only want to loop that price of code. I code in C++

20th Jun 2022, 1:44 PM
Cayden
1 Answer
0
Just use a loop that has a condition that's always true. But beware of running out of memory and also threading. If it's stuck in that loop, it might now allow you to do other tasks but I'm not sure how that particularly works in C++.
20th Jun 2022, 1:50 PM
Justice
Justice - avatar