timing on win

Started by HPW, October 07, 2004, 04:02:12 AM

Previous topic - Next topic

HPW

On WIN2K:



newLISP v.8.2.1 Copyright (c) 2004 Lutz Mueller. All rights reserved.

> (time(sleep 10))
10
> (time(sleep 100))
100
> (time(sleep 1000))
1001
> (time(sleep 10000))
10004
> (time(sleep 100000))
100004
>


On WINXP (some MHZ feaster):

newLISP v.8.2.1 Copyright (c) 2004 Lutz Mueller. All rights reserved.

> (time(sleep 10))
16
> (time(sleep 100))
94
> (time(sleep 1000))
1000
> (time(sleep 10000))
10000
> (time(sleep 100000))
100000
>


Strange?
Hans-Peter

Lutz

#1
not strange it all, it depends on the time granularity of your OS's scheduler, system load, priority status of you app., etc.



This is on XP home edition:



> (time (sleep 10))

16

> (time (sleep 100))

109

> (time (sleep 1000))

1000

> (time (sleep 1000))





On FreeBSD:



> (time (sleep 10))

20

> (time (sleep 100))

107

> (time (sleep 1000))

1003

>



and numbers are never the same if you repeat, so don't worry



Lutz