The MASM Forum

General => The Laboratory => Topic started by: dedndave on June 18, 2012, 01:38:30 PM

Title: Sleep Time
Post by: dedndave on June 18, 2012, 01:38:30 PM
Michael and I would like to run this on a few different machines, just to get an idea   :P

here's what i get on my machine, running a Prescott w/htt, XP MCE2005 SP3
Sleep(1) delay  1.953 ms
Sleep(10) delay 10.742 ms
Sleep(1) delay  1.953 ms
Title: Re: Sleep Time
Post by: KeepingRealBusy on June 18, 2012, 01:46:46 PM
On my laptop:


Intel(R) Pentium(R) 4 CPU 3.20GHz (SSE2)

Sleep(1) delay  1.953 ms
Sleep(10) delay 10.742 ms
Sleep(1) delay  1.953 ms



Dave.
Title: Re: Sleep Time
Post by: sinsi on June 18, 2012, 02:23:12 PM
AMD Phenom II X6 1100T 3.31GHz on Windows 7 Pro x64
Sleep(1) delay  15.587 ms
Sleep(10) delay 15.610 ms
Sleep(1) delay  1.029 ms

Title: Re: Sleep Time
Post by: dedndave on June 18, 2012, 02:55:16 PM
thanks guys

ok sinsi - nothing ambiguous about that run - lol
leaves me thinking, "now, i don't know what to think"   :redface:
Title: Re: Sleep Time
Post by: MichaelW on June 18, 2012, 05:32:38 PM
P3, Windows 2000:

Sleep(1) delay  10.014 ms
Sleep(10) delay 10.014 ms
Sleep(1) delay  1.013 ms

P4 Northwood, Windows XP HE Version 2002 SP3:

Sleep(1) delay  15.624 ms
Sleep(10) delay 15.613 ms
Sleep(1) delay  1.965 ms

Title: Re: Sleep Time
Post by: RuiLoureiro on June 18, 2012, 08:59:35 PM
P4 3GHz XP SP3
Sleep(1) delay  3.906 ms
Sleep(10) delay 11.718 ms
Sleep(1) delay  1.969 ms

Why Sleep(1) = 3.906 ms and = 1.969 ms ?
Title: Re: Sleep Time
Post by: Siekmanski on June 18, 2012, 10:30:35 PM
OS            : Windows v5.1.2600 Service Pack 3
Processor : (4x) Intel(R) Core(TM)2 Quad CPU Q6600  @ 2.40GHz

Sleep(1) delay  1.953 ms
Sleep(10) delay 10.742 ms
Sleep(1) delay  1.953 ms
Title: Re: Sleep Time
Post by: hutch-- on June 18, 2012, 11:44:19 PM

Sleep(1) delay  8.706 ms
Sleep(10) delay 15.625 ms
Sleep(1) delay  1.965 ms
Press any key to continue ...
Title: Re: Sleep Time
Post by: FORTRANS on June 18, 2012, 11:47:47 PM
Hi,

   Redirection to a file was not successful.  Cut & paste.

   P-III, Windows 2000.

G:\WORK>MICHAELS
Sleep(1) delay  10.014 ms
Sleep(10) delay 10.014 ms
Sleep(1) delay  1.012 ms
Press any key to continue ...


   P-MMX, Windows 98.

A:\>michaels
Sleep(1) delay  4.994 ms
Sleep(10) delay 13.792 ms
Sleep(1) delay  1.973 ms
Press any key to continue ...


Regards,

Steve N.
Title: Re: Sleep Time
Post by: clive on June 18, 2012, 11:55:20 PM
Win7 64-bit Pro, SP1
AMD Phenom II X6 1035T 2.80 GHz
16GB

Sleep(1) delay  1.000 ms
Sleep(10) delay 10.000 ms
Sleep(1) delay  1.000 ms

Title: Re: Sleep Time
Post by: dedndave on June 19, 2012, 12:01:44 AM
thanks everyone   :t
Title: Re: Sleep Time
Post by: sinsi on June 19, 2012, 12:25:24 AM
By setting the interval to 1 before any timings I got clive's numbers exactly.
The interval is a global windows setting, so any program that sets it has to reset it, maybe some apps don't.
Title: Re: Sleep Time
Post by: dedndave on June 19, 2012, 02:25:58 AM
Quote from: sinsi on June 19, 2012, 12:25:24 AMBy setting the interval to 1...

how did you do that ?
Title: Re: Sleep Time
Post by: MichaelW on June 19, 2012, 02:31:09 AM
Over the years I have tested this on a fair number of systems, not just my systems but other systems that I had worked on or otherwise had access to, and the results have been very uniform. Now they appear to be all over the map.

Perhaps this is a side effect of the change to multi-core systems. My P4 Northwood system may behave differently than Dave's Prescott system because at 3.06 GHz it was the first P4 with HT.
Title: Re: Sleep Time
Post by: dedndave on June 19, 2012, 03:48:43 AM
perhaps it is the test code that is giving us fits
maybe review it to see if it is sound

of course, we don't really know how time-slices are devised
at least, i couldn't find much about it on msdn