Fixed threading to use TimeUnit