Use atexit to sleep
Since rf495657f9d2a, we can register transaction exit function so it is better to use it when sleeping to not hold transaction for too long.
Since rf495657f9d2a, we can register transaction exit function so it is better to use it when sleeping to not hold transaction for too long.