init
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
let auctionTimer = new Map<string, NodeJS.Timer>();
|
||||
|
||||
export function getLotTimer(code: string) {
|
||||
return auctionTimer.get(code)
|
||||
}
|
||||
|
||||
export function setLotTimer(code: string, timer: NodeJS.Timer) {
|
||||
if(auctionTimer.has(code)) {
|
||||
let originTimer = auctionTimer.get(code);
|
||||
if(originTimer) clearTimeout(originTimer);
|
||||
}
|
||||
auctionTimer.set(code, timer);
|
||||
}
|
||||
|
||||
export function clearLotTimer(code: string) {
|
||||
let timer = getLotTimer(code);
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
auctionTimer.delete(code)
|
||||
}
|
||||
}
|
||||
let auctionTimer = new Map<string, any>();
|
||||
|
||||
export function getLotTimer(code: string) {
|
||||
return auctionTimer.get(code)
|
||||
}
|
||||
|
||||
export function setLotTimer(code: string, timer: any) {
|
||||
if(auctionTimer.has(code)) {
|
||||
let originTimer = auctionTimer.get(code);
|
||||
if(originTimer) clearTimeout(originTimer);
|
||||
}
|
||||
auctionTimer.set(code, timer);
|
||||
}
|
||||
|
||||
export function clearLotTimer(code: string) {
|
||||
let timer = getLotTimer(code);
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
auctionTimer.delete(code)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user