/** * 时光流逝 * @param startDate string 开始时间 * @param flowTime number 流逝时长 单位秒 * @param format string 返回格式 默认: 'HH:mm:ss' */ import { getDate } from './getDate'; import { dateFormat } from './dateFormat'; export const timeFlow = (startDate: string, flowTime: number, format = 'HH:mm:ss') => ( dateFormat(getDate(startDate) + flowTime * 1000, format) );