Add unit handling to sleep