How do I create a function that waits (up to 2 hours)?