lxw
2020-07-11 9db52f2f2dd3665fe9da1ae5657e0167c3a34d40
1
2
3
4
5
6
7
8
9
10
11
12
var MyInterval = function () {
    this.timer = "";
};
MyInterval.prototype.start = function(callback, times) {
    this.timer = setInterval(function() {
        callback();
    }, times);
}
MyInterval.prototype.stop = function() {
    clearInterval(this.timer);
}
var myInterval = new MyInterval();