Anyone know how to make a global timer ?

Anyone know how to make a global timer ?

Is anyone kind enough to help me out, I need a little exe program a counter that countsdown in memory to the time that I specify like

(wait 200) without pausing my game then when the timer in memory reaches 0 the batch file can execute a codeblock to end the potion's duration effects..

 Needed for: Potion of Mentor Double XP points for a short period of time,

Strength Tonic to Double HP for a short period of time.


Sleep is good for certain things, but not for things that need a duration time counter,

for sleep just pauses the whole game. 


Certain Bad Statues like doom, petrify that still effect you no matter where you go in the screens.


So I need a realtime duration counter.  And I can't code this in batch because I don't know how to code my counters to work in the batch file on the global level.  Because when I put a timer counter in the batch file, the timer won't even update itself unless i refresh the screen manually and it only works for me on the local level

(one screen at a time)..


So I don't know how to do global counters in batch if they can be set up

in batch code..


example. take potion of mentor.  The Effects of this last 3 minutes before it wears off.   So if I had a little global timer counting down in memory it will allow me to go anywhere i want in the gameworld for 3 minutes before the timer reaches 0 and then it jumps to the batchcode to turn off the effects of whatever potion or magic was being used no matter where you are in the game world.