Sorry I cannot help you with threads but how about the use of a timer?

here is an extract of code I've used to have a timer count down and have 
an event fire ever X milliseconds and so allows user GUI interaction to 
continue without delays.

NOTE the @timer object allows for the "destruction" or cancellation of 
the timer and the creation of it again depending on user events / 
actions within the program.

when 3 #Esc Pressed OR clicked on
  begin
    if @timer == true
      @mydb.copy_record('patrols',@PSlist3.getItemText(@PSlist3.currentItem).to_s,'status','Countdown 
STOPPED - CALL ASAP for COMFIRMATION!!')
            $fxapp.removeTimeout(@timeout)
            @timer = false
          else
            Showmsg 'Msg would be sent to another user and resent until 
keys are repressed again!', 'ALERT ALERT ALERT....'
            @mydb.copy_record('some 
text',@PSlist3.getItemText(@PSlist3.currentItem).to_s,'status','OOPS 
PANIC ! - Countdown started!!')
            @timer = true
            @timeout = $fxapp.addTimeout(2000*12, :repeat => true) do 
|sender, sel, data|
            @PSlist2.appendItem("#{Time.now}")
          end
        end

The magic is this code below...

@timeout = $fxapp.addTimeout(2000*12, :repeat => true) {|sender, sel, 
data| @PSlist2.appendItem("#{Time.now}") }

so try this...

def init
  @timeout = $fxapp.addTimeout(2000*12, :repeat => true) {|sender, sel,
   data| @label1.text = Time.now.strftime("%d/%m/%Y %H:%M:%S")}
end


HTH

Dave.

-- 
Posted via http://www.ruby-forum.com/.