improve resolution stream-length-in-millisecond calculation