split sleep time into work time and rest time