Files
NapCatQQ/.pnpm-store/v3/files/77/c611444dcde8afdbc49fa41b7c452aa029ed7a9df2f0e315c4031d39faeb684768f208dc175bb6d6824b3ee173ad82b7dda24b7b7e72ec571441fc4e1bc73a
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

19 lines
430 B
Plaintext

'use strict';
const format = require('./format');
const ms = require('ms');
/*
* function ms (info)
* Returns an `info` with a `ms` property. The `ms` property holds the Value
* of the time difference between two calls in milliseconds.
*/
module.exports = format(info => {
const curr = +new Date();
this.diff = curr - (this.prevTime || curr);
this.prevTime = curr;
info.ms = `+${ms(this.diff)}`;
return info;
});