# File lib/new_relic/agent/worker_loop.rb, line 31
      def setup(period, task)
        @task = task
        @period = period if period
        @should_run = true
        @iterations = 0

        now = Time.now
        @deadline = now + @duration if @duration
        @next_invocation_time = (now + @period)
      end