apply a timeout to synchronize process