def check_timer
            @reactor.update_time

            existing = @next
            schedule = @scheduled.first
            @next = schedule.nil? ? nil : schedule.next_scheduled

            if existing != @next
                # lazy load the timer
                if @timer.nil?
                    new_timer
                else
                    @timer.stop
                end

                if not @next.nil?
                    in_time = @next - @reactor.now

                    # Ensure there are never negative start times
                    if in_time > 3
                        @timer.start(in_time)
                    else
                        # Effectively next tick
                        @timer.start(0)
                    end
                end
            end
        end
def check_timer
            @reactor.update_time

            existing = @next
            schedule = @scheduled.first
            @next = schedule.nil? ? nil : schedule.next_scheduled

            if existing != @next
                # lazy load the timer
                if @timer.nil?
                    new_timer
                else
                    @timer.stop
                end

                if not @next.nil?
                    in_time = @next - @reactor.now

                    # Ensure there are never negative start times
                    if in_time > 3
                        @timer.start(in_time)
                    else
                        # Effectively next tick
                        @timer.start(0)
                    end
                end
            end
        end
Ensures the current timer, if any, is still
 accurate by checking the head of the schedule