is it possible to make setAutoWaitTimeout() to less than one second, if so how?

Asked by Charles Thomas on 2017-06-30

i have tried putting in 0.01 in the parenthesis but it doesn't seem to be shortening the time.

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2017-06-30
Last query:
2017-06-30
Last reply:
2017-06-30
masuo (masuo-ohara) said : #1

You should confirm that how long does it take to call SikuliX feature at your environment.

For example, it takes about 300 msec at exists() at my environment.
So setAutoWaitTimeout(0.01) is nonsense at my environment.

import datetime
print datetime.datetime.today()
exists("1498803735998.png",0)
print datetime.datetime.today()

Charles Thomas (jcdt37) said : #2

not completely sure what you mean, is it just not possible?

Best Manfred Hampl (m-hampl) said : #3

From http://sikulix-2014.readthedocs.io/en/latest/region.html#Region.setAutoWaitTimeout

"Parameters:
seconds – a number, which can have a fraction. The internal granularity is milli-seconds."

So you can e.g. set it to half a second with "setAutoWaitTimeout(0.5)"

What masuo wanted to indicate is that it does not make sense to set it to a value which is smaller than the duration that an exists() command needs for execution.

Charles Thomas (jcdt37) said : #4

Thanks Manfred Hampl, that solved my question.

Charles Thomas (jcdt37) said : #5

thanks for the explanation, i just needed to know cuz i needed at at least 80 milliseconds, and i had no clue cuz i tried to learn all this in just the past 24 hours.