Kent Johnson <ken...@tds.net> wrote:

> On Wed, Nov 25, 2009 at 11:11 AM, spir <denis.s...@free.fr> wrote:
> > Hello,
> >
> > How does python get the time in microseconds? (In other words, how would I 
> > get it if python (like some other languages) would provide time in whole 
> > seconds only?)
> 
> Use the source...in particular, see floattime() in timemodule.c:
> http://svn.python.org/view/python/branches/release31-maint/Modules/timemodule.c?view=markup
> 
> Kent
> 

Thanks, Kent.
So, python  uses C's gettimeofday() func when available (microsecond), or 
ftime() (millisecond), else it has only plain second precision using time(). 
But there is no matching system call AFAIK except for time (via datetime in 
unix-like systems). So, does someone know of any solution via the system 
itself? How do C funcs get precise time, anyway?

Denis
________________________________

la vita e estrany

http://spir.wikidot.com/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to