Timers dont take resources when not used?

Discuss any general programming issues here
Post Reply
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Timers dont take resources when not used?

Post by Bugala »

Just checking to make sure.

I suppose If I start at beginning of program a Timer that I never use, it will never use any running power resources, right?

That I can start even 100 timers and they never take any CPU resource, unless I use something like GetTimer() on them.

Just checking this so that I can leave some timers running in my program without having to take care of turning them off, for right now I have this system where I start one certain Timer at beginning of program, and then when I actually enter the loop where I need it, I use ResetTimer() to reset it to 0 at that loops initialization point, and even I exit that loop at later point, I dont turn it off, since I anyway later return back to that same loops initialization at which point I just use ResetTimer() instead of StartTimer().
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Timers dont take resources when not used?

Post by airsoftsoftwair »

Bugala wrote: Thu Jun 01, 2023 4:44 pm I suppose If I start at beginning of program a Timer that I never use, it will never use any running power resources, right?
Well, they won't use any CPU cycles but of course each timer you start will use some memory (albeit very little).
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: Timers dont take resources when not used?

Post by Bugala »

Thanks. This what I supposed.
Post Reply