← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #166167]: Loop for a fixed time

 

Question #166167 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/166167

RaiMan proposed the following answer:
The above snippet makes it possible to check something, if the time is
over and you might continue the loop with a modified end value.

If you do not need this option, this version is even shorter:

start = time.time()
end = start + 60
while time.time() < end:
    # some code
# first statement after loop

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.