The _length field should support milliseconds out of the box. So you probably can save your (very good) ms conversion code.