Author Topic: Sleep Time  (Read 5196 times)

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Sleep Time
« 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
Code: [Select]
Sleep(1) delay  1.953 ms
Sleep(10) delay 10.742 ms
Sleep(1) delay  1.953 ms

KeepingRealBusy

  • Member
  • ***
  • Posts: 426
Re: Sleep Time
« Reply #1 on: June 18, 2012, 01:46:46 PM »
On my laptop:

Code: [Select]
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.

sinsi

  • Member
  • ****
  • Posts: 996
Re: Sleep Time
« Reply #2 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

I can walk on water but stagger on beer.

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: Sleep Time
« Reply #3 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:

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
Re: Sleep Time
« Reply #4 on: June 18, 2012, 05:32:38 PM »
P3, Windows 2000:
Code: [Select]
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:
Code: [Select]
Sleep(1) delay  15.624 ms
Sleep(10) delay 15.613 ms
Sleep(1) delay  1.965 ms
Well Microsoft, here’s another nice mess you’ve gotten us into.

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: Sleep Time
« Reply #5 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 ?

Siekmanski

  • Member
  • *****
  • Posts: 1093
Re: Sleep Time
« Reply #6 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

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4812
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Sleep Time
« Reply #7 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 ...
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

FORTRANS

  • Member
  • ****
  • Posts: 945
Re: Sleep Time
« Reply #8 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.

clive

  • Regular Member
  • *
  • Posts: 27
  • Toolsmith and Assembler coder (x86,ARM,MIPS,68K)
Re: Sleep Time
« Reply #9 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

It's a pity the clowns in Washington DC don't understand the Constitution as well as Edward Snowden

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: Sleep Time
« Reply #10 on: June 19, 2012, 12:01:44 AM »
thanks everyone   :t

sinsi

  • Member
  • ****
  • Posts: 996
Re: Sleep Time
« Reply #11 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.
I can walk on water but stagger on beer.

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: Sleep Time
« Reply #12 on: June 19, 2012, 02:25:58 AM »
By setting the interval to 1...

how did you do that ?

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
Re: Sleep Time
« Reply #13 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.
Well Microsoft, here’s another nice mess you’ve gotten us into.

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: Sleep Time
« Reply #14 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