Update worker.rb

Added missing require 'time' for #823 (from 54ff7ca004c4d6aea48145cada951834eb044305)