Add perSecond function.
Merge branch 'persecond'