On Sun, Apr 4, 2010 at 3:40 AM, Jesse Jurman <e.j.jurman / gmail.com> wrote: > Jesse Jurman wrote: > >> Right now I need a means to delay the next song for the number of >> seconds that the current song is playing. > > I'm using the Snack audio toolkit for ruby, so I already know how long > the song is... I don't need to constantly check if the song is > playing... I just need to have a block of code run after a set number of > seconds. In stdlib Tk: ruby -rtk -e 'Tk.after(5000){ puts "hi" }; Tk.mainloop' In ffi-tk: ruby -rffi-tk -e 'Tk::After.ms(5000){ puts "hi" }; Tk.mainloop' -- Michael Fellinger CTO, The Rubyists, LLC