calculates number of hours spent on different activities