Files
fitness_walk_nwnu/node_modules/adbkit/lib/adb/tcpusb/rollingcounter.js
T
2026-09-08 20:28:54 +08:00

22 lines
387 B
JavaScript

var RollingCounter;
RollingCounter = (function() {
function RollingCounter(max, min) {
this.max = max;
this.min = min != null ? min : 1;
this.now = this.min;
}
RollingCounter.prototype.next = function() {
if (!(this.now < this.max)) {
this.now = this.min;
}
return ++this.now;
};
return RollingCounter;
})();
module.exports = RollingCounter;