ruby - Can I create an interval loop in an array? -


i'm trying created timed loop in array. mean..

array = [10, 15, 19, 25] array.each |e|     loop         ...     end end 

i want output this:

10 #=> waits 10 seconds... 15 #=> waits 10 seconds... 19 #=> waits 10 seconds... 25 

is possible? thank in advance. :)

sleep x pauses output x number of seconds.

so you're looking is:

array = [10, 15, 19, 25] array.each |e|   puts e   sleep 10 end 

Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -