sleep.c code reduction