This commit is contained in:
aozhiwei 2022-05-04 00:46:28 +08:00
parent 786102288f
commit 59b3ef222d

View File

@ -65,6 +65,10 @@ function isOnlineEnv() {
return !serverEnv;
}
function getTickCount() {
return Math.floor((new Date()).getTime() / 1);
}
function getUtcTime() {
return Math.floor((new Date()).getTime() / 1000);
}
@ -245,6 +249,7 @@ exports.sleep = sleep;
exports.emptyReplace = emptyReplace;
exports.throwError = throwError;
exports.isOnlineEnv = isOnlineEnv;
exports.getTickCount = getTickCount;
exports.getUtcTime = getUtcTime;
exports.formatDate = formatDate;
exports.pad = pad;