Is there a way to time the amount of time that happened between (for example) button a being pressed and button b being pressed in Python? If so, how?
Thanks for any help.
Is there a way to time the amount of time that happened between (for example) button a being pressed and button b being pressed in Python? If so, how?
Thanks for any help.
You dislike to search before ask, isnt't it?
there is a module surprisingly called time
import time
start = time.time()
for i in range(10):
print i
stop = time.time()
print 'elapsed time in seconds', stop - start
You can use the time function
import time
start = time.time()
#do stuff
end = time.time()
logger.debug("time:{0}".format(end-start))