# File lib/new_relic/agent/worker_loop.rb, line 55
      def schedule_next_invocation
        now = Time.now
        while @next_invocation_time <= now && @period > 0
          @next_invocation_time += @period
        end
        @next_invocation_time - Time.now
      end