Calculating events per slice of time