Replaced msec calculation method.

Currently used method is used by jkbotti.