From: Jan E. <ch...@in...> - 2000-10-12 18:39:14
|
On Thu, 12 Oct 2000, Peter Nicolai wrote: > >> I poll for events from pysdl using the normal >> sdl.events_poll() and handle >> available events. Then when all events are handled I >> check for the current >> time using time.clock(), which according to the docs >> is *the* function to >> use for timing and benchmarking. > >I think a while back we figured out that time.clock() >has more precision on windows and time.time() has more >precision on linux, so maybe it's less likely to get >'interrupted'? I don't know if it will help but maybe >it wouldn't hurt to try -P Yes, it has more precision, and above all: it works too. Thanks a lot for the help. The weird thing is that time.clock() seemed to be suspended while the network connection was open, it game the same value minute after minute, and as soon as the connection was trminated by the remote peer it started counting seconds and 1/10:ths of seconds. The value was always very low a few seconds), so apparently the counter was started when the application was started, or something similar? Anyway, time.time() seems to work ok, I just need to manipulate the float a little bit. Back to work... :-) --------------------+-------------------------------------------------------- Jan 'Chakie' Ekholm | Balrog New Media http://www.balrog.fi/ Linux Inside | I'm the blue screen of death, nobody hears your screams |