How to measure elapsed time

Asked by Kenneth Chong on 2012-04-04

I would like to know how to set a timer up in sikuli to time specific image, or text, or any object that appears on a webpage.
So if I go to a webpage, I want to know how long it takes before the text "TV" appears, or how long it takes before an image appears. I've seen something with time.time(), but somehow sikuli does not recognize that.

Are you able to provide me a code for this?

Thanks alot,

Kenn

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2012-04-04
Last reply:
2012-04-04
RaiMan (raimund-hocke) said : #1

start = time.time()
# some code, that takes some time ;-)
duration = time.time() - start # in seconds

Can you help with this problem?

Provide an answer of your own, or ask Kenneth Chong for more information if necessary.

To post a message you must log in.