WebFaction
Community site: login faq

On web348 time.clock does not seem to work.

I'm trying to time some calls on my django app using time.clock(). However it does not seem to be ticking forward so I'm just seeing 0 time spent in calls.

For example:
[alpatters@web348 user]$ python2.7
Python 2.7.3 (default, May 18 2012, 14:51:16)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.clock()
0.02
>>> time.clock()
0.02
>>> time.clock()
0.02
>>> time.clock()
0.02
>>> time.clock()
0.02
>>> time.clock()
0.02

asked 27 Jan '13, 08:47

alpatters
122
accept rate: 0%

edited 27 Jan '13, 11:26

bmeyer71 ♦♦
1.5k3613

What is it exactly that you are trying to do? Time how long a task takes?

(27 Jan '13, 11:27) bmeyer71 ♦♦

This explains it, I think. http://stackoverflow.com/questions/85451/python-time-clock-vs-time-time-accuracy

permanent link

answered 17 Feb '13, 12:49

darter
26134
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×910
×337
×1

question asked: 27 Jan '13, 08:47

question was seen: 5,271 times

last updated: 17 Feb '13, 12:49

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM