大侠
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
473 B

/**耗时时间单位 */
class PerUtils {
static get now() {
if (performance?.now) {
return performance.now();
} else {
return Date.now();
}
}
private static time: number = 0;
static start() {
this.time = this.now;
}
static End(flag?: string, ...vlaue) {
let time = this.now - this.time;
ConsoleEx.Log(flag, vlaue, "执行时间ms:", time);
}
}
export default PerUtils;