converted timer service into a directive.