write time in ms