1. A system comprising: memory; one or more processors coupled to the memory and configured to execute a runtime on an operating system; and the runtime configured to transfer an application from foreground to background and to put the application in a paused state at least in part by, in response to execution of a pause handler, stopping executing threads of the application which are not in a wait state and preventing threads of the application that are in the wait state from running, the runtime configured to adjust remaining times of waits in the threads that are in the wait state to provide adjusted remaining times to account for a duration of the paused state, the runtime configured to perform a resume application operation that takes into consideration the adjusted remaining times to transfer the application from the background to the foreground.