sleep function graph