Only just spotted this.
"spir" wrote
It's not C's function, it's a Unix system call.
It's been part of Unix since BSD 4.2
I am confused here. That's what I first thought (there _must_ be a way to
get time
more precise that seconds!). But on my system (ubuntu 9.10) I cannot find
the
proper
>> 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
On Fri, Nov 27, 2009 at 6:07 PM, spir wrote:
> I am confused here. That's what I first thought (there _must_ be a way to get
> time more precise that seconds!). But on my system (ubuntu 9.10) I cannot
> find the proper manner to use these system calls. Even from the command-line
> directly. Ce
"Alan Gauld" wrote:
Thank you, Alan.
> "spir" wrote
>
> > So, python uses C's gettimeofday() func when available
>
> It's not C's function, it's a Unix system call.
> It's been part of Unix since BSD 4.2
>
> > ftime() (millisecond),
>
> Also Unix and predates BSD 4.2...
I am confused he
"spir" wrote
So, python uses C's gettimeofday() func when available
It's not C's function, it's a Unix system call.
It's been part of Unix since BSD 4.2
ftime() (millisecond),
Also Unix and predates BSD 4.2...
else it has only plain second precision using time().
Which is an ANSI C
Kent Johnson wrote:
> On Wed, Nov 25, 2009 at 11:11 AM, spir 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,
On Thu, Nov 26, 2009 at 9:28 PM, Modulok 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
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.
On Wed, Nov 25, 2009 at 11:11 AM, spir 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
spir 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?)
Thank you,
Denis
la vita e estrany
http://spir.wikidot.com/
You need to
spir wrote:
Hello,
How does python get the time in microseconds?
time.time() should provide fractional second accuracy if the system
provides them. Did the system clock actually record fractional seconds?
___
Tutor maillist - Tutor@python.org
T
"spir" wrote
How does python get the time in microseconds?
The underlying OS API generally provides that.
(In other words, how would I get it if python (like some other
languages) would provide time in whole seconds only?)
You would have to call the OS routines directly from Python
you
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?)
Thank you,
Denis
la vita e estrany
http://spir.wikidot.com/
13 matches
Mail list logo