Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
timeToDelay = .01 estimate = timeToDelay * 100 startTime = TimeYmdHms() For counter = 1 To 100 TimeDelay(timeToDelay) Next difference = TimeDiffSecs(TimeYmdHms(), startTime) Message("Finished with Delay = %timeToDelay%", "Should be %estimate%. Actual = %difference%")Am I using this function wrong?
timeToDelay = -0.01 estimate = timeToDelay * 100 startTime = TimeYmdHms() For counter = 1 To 100 TimeDelay(timeToDelay) Next difference = TimeDiffSecs(TimeYmdHms(), startTime) Message("Finished with Delay = %timeToDelay%", "Should be %estimate%. Actual = %difference%")The timedelay function gives up processing time and asks the system to resume the function in the desired amount of time. So during the interim the system asks all the other programs in the system how they are doing, then checks to see if the time elapsed yet, and if so, resumes WinBatch. For small amounts of time (like 1/100 of a sec) it might take a bit longer than 1/100th of a second to service all the other applications and get back to WinBatch.
Specifying negative numbers uses a different, more accurate algorithm BUT does not give up much CPU time to other appplications. If you are waiting for ini files to be updated...Did you try
iniwritepvt("","","",inifilename)which is supposed to do that?
Article ID: W16727
File Created: 2005:02:18:12:22:04
Last Updated: 2005:02:18:12:22:04