获得战报,刷新,领取
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
|
||||
const PER_SECOND = 1 * 1000;
|
||||
const PER_DAY = 24 * 60 * 60;
|
||||
|
||||
export function nowSeconds() {
|
||||
return Math.floor(Date.now() / PER_SECOND );
|
||||
}
|
||||
@@ -11,4 +13,11 @@ export function getTodayZeroPoint() {
|
||||
date.setSeconds(0);
|
||||
var time = Math.floor(date.getTime() / PER_SECOND);
|
||||
return time;
|
||||
}
|
||||
|
||||
export function checkTodayTime(seasonEndTime: number) {
|
||||
if (seasonEndTime - nowSeconds() <= PER_DAY) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user