Pausing during a loop

Moderator: wwlytton

Post Reply
stu2010
Posts: 5
Joined: Mon Jun 30, 2014 8:28 am

Pausing during a loop

Post by stu2010 » Wed Jul 23, 2014 10:20 am

Hello
I am running a loop of different graphs
This may be silly, but is it possible to pause the loop for a few seconds before it continues onto the next iteration.
Thanks

ted
Site Admin
Posts: 5053
Joined: Wed May 18, 2005 3:50 pm
Location: Yale University School of Medicine
Contact:

Re: Pausing during a loop

Post by ted » Wed Jul 23, 2014 1:43 pm

Try calling this func with the desired argument

Code: Select all

// argument is in seconds
func pause() { local tmp
  tmp=startsw()
  while (startsw()-tmp<$1) { }
  return startsw()-tmp
}

Post Reply