Code required to put a process to sleep