lasitha wrote: > On Thu, Apr 9, 2009 at 8:29 AM, Claire Hill <cartajo / gmail.com> wrote: >> [...] >> >> def repeat_every(seconds) >> begin >> time_spent = time_block { yield } >> sleep(seconds - time_spent) >> end while time_spent < seconds >> end > > FYI, if time_spent > seconds in the above method, the call to sleep > will raise 'ArgumentError: time interval must be positive'. > > cheers, > lasitha hi lasitha..:) thanks for the info...sure it helps a lot..:) -- Posted via http://www.ruby-forum.com/.