change duration from second to millisecond