Re: How to get high precision timer in python?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?GB2312?B?zPC5zw==?=

    Re: How to get high precision timer in python?

    2008/10/29 James Mills <prologic@short circuit.net.au> :
    On Wed, Oct 29, 2008 at 12:14 PM, Ìð¹Ï <littlesweetmel on@gmail.comwro te:
    >I use python2.5 in WindowsXP. If using time.time() as timer, it seems
    >
    On the win32 platform should you not
    be using time.clock vs. time.time ?
    >
    Well, whatelse can I use?

    ShenLei
  • Tim Roberts

    #2
    Re: How to get high precision timer in python?

    "????" <littlesweetmel on@gmail.comwro te:
    >2008/10/29 James Mills <prologic@short circuit.net.au> :
    >On Wed, Oct 29, 2008 at 12:14 PM, ???? <littlesweetmel on@gmail.comwro te:
    >>I use python2.5 in WindowsXP. If using time.time() as timer, it seems
    >>
    >On the win32 platform should you not
    >be using time.clock vs. time.time ?
    >
    >Well, whatelse can I use?
    I'm not sure you understood what he was saying. time.time() and
    time.clock() can both be used for elapsed timing, but because of a fluke of
    implementation, time.time() is more precise on Linux, and time.clock() is
    more precise on Windows.

    So, use time.clock().
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.

    Comment

    • James Mills

      #3
      Re: How to get high precision timer in python?

      On Wed, Oct 29, 2008 at 4:22 PM, Tim Roberts <timr@probo.com wrote:
      I'm not sure you understood what he was saying. time.time() and
      time.clock() can both be used for elapsed timing, but because of a fluke of
      implementation, time.time() is more precise on Linux, and time.clock() is
      more precise on Windows.
      That's exactly what I was getting at, only I couldn't
      have been bothered explaining why! :)

      --JamesMills


      --
      --
      -- "Problems are solved by method"

      Comment

      Working...