Modified the TimeService to be threadsafe

Signed-off-by: Martin Evans <martindevans@gmail.com>