From: Peter N. <pn...@ya...> - 2000-06-09 06:46:10
|
> > This is interesting. Results under Unix: > > avg smallest difference between two calls to time(): > 8.32080841064e-06 seconds. > avg smallest difference between two calls to > clock(): 0.01 seconds. > Whoa! 8 microseconds??? Something weird is happening, here, though. Look, I ran it again (this is maybe 3 hrs later than the first post...) avg smallest difference between two calls to time.time(): 0.0549999952316 seconds. avg smallest difference between two calls to time.clock(): 1.24038284412e-005 seconds. I don't know what I did but I'm gaining on you, uh, inversely. I remember reading about a bug that literally depended on the phase of the moon... I'm gonna go for a beer :) > To wit: opposite results in terms of precision. I guess a smart program would do this test before starting up the game. Are there any other timing functions available? It seems like someone would have written a more solid time module by now if the regular one is so goofy. > The issue, of course, is whether or not it works on > the Mac. Does > anyone on list have a Mac we could try this code out > on? > I can try it tomorrow, I'll let you know. They have both old and new Macs at school, and now I'd like to try it on a Unix machine too. Weird. > Incidently, you're missing an 'import time' line at > the top :) ha ha but actually I didn't need the 'sys' there I guess PS -- tried the test again, back to the old scores!!! What is going on??? __________________________________________________ Do You Yahoo!? Yahoo! Photos -- now, 100 FREE prints! http://photos.yahoo.com |