improved time counting

- changed algorithm to introduce less drift
- created defne for MILLIS_PER… instead of PER_MINUTE
nit white space clean up