Added thread check of time