Metrics for event detection

Fixed some bugs (round DatetimeIndex to next s)