Run a process for a specific lenght of time