a better ifdef for platform differences in sleep