def next
      result = nil
      @mutex.synchronize do 
        clearCancelled
        result = @queue.pop 
      end
      if result
        yield result.secondsUntilExpiry if block_given?
        if result.recurring
          result.refresh
          @mutex.synchronize{ @queue.push result }
        end
      end
      result
    end
def next
      result = nil
      @mutex.synchronize do 
        clearCancelled
        result = @queue.pop 
      end
      if result
        yield result.secondsUntilExpiry if block_given?
        if result.recurring
          result.refresh
          @mutex.synchronize{ @queue.push result }
        end
      end
      result
    end
Remove the next timer event from the queue and return it as a TimerHandler::TimerInfo object.
 Warning: if the timer is a recurring timer, the secondsUntilExpiry will be set to the NEXT time
 the timer would expire, instead of this time. If the original secondsUntilExpiry is needed,
 pass a block to this method, and the block will be called with the original secondsUntilExpiry.