Implemented a maximal time for waves