Modify

Opened 12 years ago

Closed 12 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 Changed 12 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to closed

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.