%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/node_modules/pm2/node_modules/@pm2/io/build/main/utils/metrics/
Upload File :
Create Path :
Current File : //usr/lib/node_modules/pm2/node_modules/@pm2/io/build/main/utils/metrics/counter.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class Counter {
    constructor(opts) {
        this.used = false;
        opts = opts || {};
        this._count = opts.count || 0;
    }
    val() {
        return this._count;
    }
    inc(n) {
        this.used = true;
        this._count += (n || 1);
    }
    dec(n) {
        this.used = true;
        this._count -= (n || 1);
    }
    reset(count) {
        this._count = count || 0;
    }
    isUsed() {
        return this.used;
    }
}
exports.default = Counter;

Zerion Mini Shell 1.0