time.time() not accurate enough

7 views
Skip to first unread message

Will McGugan

unread,
Feb 1, 2008, 8:24:14 AM2/1/08
to minifb
Hi,

I've noticed that time.time() is used to set call_id. The Python docs
say that this function may not always have a better precision that one
second. If this was the case it is feasible that call_id may be the
same value for 2 or more calls. Perhaps it would be better to use
time.clock() which gives more accuracy?

Regards,

Will McGugan

peteshinners

unread,
Feb 1, 2008, 9:02:24 PM2/1/08
to minifb
Sounds like a good and easy fix. Does it seem like time.clock() would
be better than just keeping a global counter incrememted on each call?
Reply all
Reply to author
Forward
0 new messages