I was looking into the clock resolution for Jython and ran into something that doesn't seen right to me.  I ran simple tests  on Windows XP and Linux and came up with the following results:

Windows XP
    Python
        time.clock()    -   2 microseconds
        time.time()    - 15 milliseconds

    Jython
        time.clock() - 15 milliseconds
        time.time()    - 15 milliseconds

Linux
    Python
        time.clock()    - 10 milliseconds
        time.time()    - 5 microseconds
       
    Jython
        time.clock() - 1 millisecond
        time.time()    - 1 millisecond

Shouldn't time.clock() on Jython for Windows and time.time() on Linux have much better resolution?  I believe that if Jython used Java nanoTime it could reach these levels.  Am I way off base?

It also looks like Python may have a problem with time.clock() on Linux, but that is for a different forum.

I have simple scripts to demo this if anyone is interested, and will open a problem against the current code if that is where the problem is, but I don't know the plan for Jython to implement clock timing. 

 - Bob

Check Out the new free AIM(R) Mail -- Unlimited storage and industry-leading spam and email virus protection.