temporal calculations using resting and working periods