Skip to main content

You can also use time.clock() It counts the time used by the process on Unix and time since the first call to it on Windows. It's more precise than time.time().

It's the usually used function to measure performance.

Just call

import time t_ = time.clock() #Your code here print 'Time in function', time.clock() - t_ 

EDITED: Ups, I miss the question as you want to know exactly the time, not the time spent...

You can also use time.clock() It counts the time used by the process on Unix and time since the first call to it on Windows. It's more precise than time.time().

It's the usually used function to measure performance.

Just call

import time time.clock() #Your code here print 'Time in function', time.clock() 

EDITED: Ups, I miss the question as you want to know exactly the time, not the time spent...

You can also use time.clock() It counts the time used by the process on Unix and time since the first call to it on Windows. It's more precise than time.time().

It's the usually used function to measure performance.

Just call

import time t_ = time.clock() #Your code here print 'Time in function', time.clock() - t_ 

EDITED: Ups, I miss the question as you want to know exactly the time, not the time spent...

deleted 283 characters in body; added 380 characters in body
Source Link
Khelben
  • 6.5k
  • 6
  • 37
  • 46

You can also use time.clock() It counts the time used by the process on Unix and time since the first call to it on Windows. It's more precise than time.time().

It's the usually used function to measure performance.

Just call

import time time.clock() #Your code here print 'Time in function', time.clock() 

EDITED: Ups, I miss the question as you want to know exactly the time, not the time spent...

You can also use time.clock() It counts the time used by the process on Unix and time since the first call to it on Windows. It's more precise than time.time().

It's the usually used function to measure performance.

Just call

import time time.clock() #Your code here print 'Time in function', time.clock() 

You can also use time.clock() It counts the time used by the process on Unix and time since the first call to it on Windows. It's more precise than time.time().

It's the usually used function to measure performance.

Just call

import time time.clock() #Your code here print 'Time in function', time.clock() 

EDITED: Ups, I miss the question as you want to know exactly the time, not the time spent...

deleted 11 characters in body
Source Link
Khelben
  • 6.5k
  • 6
  • 37
  • 46

You can also use time.clock() It counts the time used by the process on Unix and time since the first call to it on Windows. It's more precise than time.time() in Windows.

It's the usually used function to measure performance.

Just call

import time time.clock() #Your code here print 'Time in function', time.clock() 

You can also use time.clock() It counts the time used by the process on Unix and time since the first call to it on Windows. It's more precise than time.time() in Windows.

It's the usually used function to measure performance.

Just call

import time time.clock() #Your code here print 'Time in function', time.clock() 

You can also use time.clock() It counts the time used by the process on Unix and time since the first call to it on Windows. It's more precise than time.time().

It's the usually used function to measure performance.

Just call

import time time.clock() #Your code here print 'Time in function', time.clock() 
Source Link
Khelben
  • 6.5k
  • 6
  • 37
  • 46
Loading