Modify

Opened 18 years ago

Closed 18 years ago

#404 closed Bug (No Bug)

the time of the Sleep() command is vague

Reported by: De`ak (bigdeak@… Owned by:
Milestone: Component: AutoIt
Version: 3.2.12.1 Severity: None
Keywords: Sleep Cc:

Description

Hello Developers,

i did some tests on vista and windows XP, the sleep times of the sleep command is really vagua. I'm working on a software, where i need a sleep of 1 ms, but if i use Sleep( 1 ), the real stop time is 10 ms on Vista and 15 ms on xp.
Here is a source code of testing the Sleep() function:

while 1
	
	$begin = TimerInit()
	Sleep( 1 )
	$dif = TimerDiff($begin)
	ConsoleWrite($dif & @CRLF)
	
Wend

The strange thing is: If you give a time of 11 ms on Vista, the sleep time is 21 ms (on xp the time is given: 16 ms -> 31 ms), or 22 for 32 ms on Vista etc.

it would be nice if the Sleep() function is preciser...

sorry for my bad english XD

Attachments (0)

Change History (1)

comment:1 by Valik, 18 years ago

Resolution: No Bug
Status: newclosed

Not a bug. Could perhaps be documented but it's not anything terribly important.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.