Need to handle interruptions while nanosleeping and re-try remaining sleep. Otherwise sleep will error out instead of completing as expected.