Thread: Help me!!!

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    2
    Rep Power
    0

    Thumbs up Help me!!!


    I am so eager to konw how to use "import timing".I try this in my computer,but i get"ImportError: No module named timing".Help me please!!!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    133
    Rep Power
    12
    Take a look at this: Appendix 5: Obsolete Modules.
    Last edited by percivall; June 13th, 2004 at 01:55 AM.
  4. #3
  5. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    As displayed on the Obsolete modules page you shoud probably use time.clock() at http://docs.python.org/lib/module-time.html

    clock( )

    On Unix, return the current processor time as a floating point number expressed in seconds. The precision, and in fact the very definition of the meaning of ``processor time'', depends on that of the C function of the same name, but in any case, this is the function to use for benchmarking Python or timing algorithms.

    On Windows, this function returns wall-clock seconds elapsed since the first call to this function, as a floating point number, based on the Win32 function QueryPerformanceCounter(). The resolution is typically better than one microsecond.
    If your trying to get a benchmark for your program or testing how long something takes you might want to to look at the following modules:

    http://docs.python.org/lib/module-timeit.html
    http://docs.python.org/lib/module-hotshot.html
    http://docs.python.org/lib/module-profile.html

    You can also do this using pystone which i think should be in the tools directory .

    Please also read the sticky at the top of this forum regarding how to post a question!

    http://forums.devshed.com/t131489/s.html

    Hope this helps,

    Mark.
    programming language development: www.netytan.com Hula

  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    2
    Rep Power
    0

    Thanks so much!


    You are helpful!

IMN logo majestic logo threadwatch logo seochat tools logo