[Tutor] python time

Kent Johnson kent37 at tds.net
Fri Nov 27 05:54:05 CET 2009


On Thu, Nov 26, 2009 at 9:28 PM, Modulok <modulok at gmail.com> wrote:
> Doesn't time.time return a float?

>>>> time.time()
> 1259288538.576565
>
> Right?

Yes.

I'm not at all sure I understand the original question, but one
plausible interpretation is, "How does python get the time to high
accuracy? I want to do that in my programs." That is the question I
was answering.

Kent

> -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