var now = new Date();
var exitTime = now.getTime() + numberMillis; //numberMillis毫秒超时参数
while (true) { try {
//逻辑处理
// 如果符合可以直接return "";
}catch(ignored) {
//exception
} now = new Date();
if (now.getTime() > exitTime){return "";
}
}
2021-11-23 02:23:30
var now = new Date();
var exitTime = now.getTime() + numberMillis; //numberMillis毫秒超时参数
while (true) { try {
//逻辑处理
// 如果符合可以直接return "";
}catch(ignored) {
//exception
} now = new Date();
if (now.getTime() > exitTime){return "";
}
}
下一篇:python 装饰器