Whats the alternative to using windows' "Sleep" in the windows environment? Specifically, I'm trying create a delay when the player touches a switch (its a boolean switch/*on/off*/) so that the switch doesn't remain turned on at the time the collision is true.
Is a an alternative to sleep with this problem?
Or do I have to use a time counter as an alternative? and if so, how would I do it?
Is this for some kind of game? If so, you already have a main loop that does a fixed amount of logic ticks per second.
Just count ticks until you reach the desired target and then turn off the switch.
Have you heard of the continue keyword? It will force a loop it's in to skip to its next iteration. You could use that to effectively skip certain operations that you don't want to happen in a loop while (was it?) the button is on.
Although... I'll admit that I am not 100% of what you need. :/