[Tutor] python time

Modulok modulok at gmail.com
Fri Nov 27 03:28:55 CET 2009


Doesn't time.time return a float?

>>> import time
>>> help(time.time)
Help on built-in function time in module time:

time(...)
    time() -> floating point number

    Return the current time in seconds since the Epoch.
    Fractions of a second may be present if the system clock provides them.


>>> time.time()
1259288538.576565

Right?
-Modulok-

On 11/26/09, Kent Johnson <kent37 at tds.net> wrote:
> On Wed, Nov 25, 2009 at 11:11 AM, spir <denis.spir at 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
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list