a helper to call node-sleep to change async method to sync