update duration to milliseconds