sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #51072
Re: [Question #679402]: Response time
Question #679402 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/679402
Status: Open => Answered
RaiMan proposed the following answer:
What version of SikuliX?
Looks like you are using the Java API, since you "see" the method
match.getTime() (not official API though and hence docs might suffer).
match.getTime(): the overall time in milliseconds for the complete find
op including the time that might be needed to wait for the image to
appear (load/prepare image, repeatedly look for the image, return the
match).
example:
Screen screen = new Screen();
Match match = src.exists("someImage", 10)
if (null == match) System.out.println("not found");
else System.out.println(String.format("time elapsed until image appeared: %d milliseconds", match.getTime())
- we will wait max 10 seconds for the image to appear
- if not there: match is null
- if the image lets say appeared after 5 seconds, getTime() should return a value of about 6000
to measure elapsed time:
long start = new Date().getTime()
// some code
long elapsed = new Date().getTime() - start
elapsed is milliseconds
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.