Hey guys,still wondering what would be the easiest way to program a real stopwatch, which starts with the game, including seconds, minutes, hours not neccessarily needed. total_secs would be one way, but is it the easiest?!?! greets
Re: Stop!!! The watch!! - Stopwatch
[Re: FraK]
#327621 06/07/1016:3006/07/1016:30
Although I have already experienced the modulo in c++, it's quite good to remind myself of it with this tutorial, it's very nice! thank you Michael_Schwarz
Re: Stop!!! The watch!! - Stopwatch
[Re: FraK]
#327987 06/09/1018:1906/09/1018:19
i would add time_step to a timer variable each frame. convert it from ticks to seconds and then use fraction() for hundredth, % for seconds, integer division for minutes,...
but a solution with total_seconds should work too.