Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timers: remove unused repeat param in timer_wrap #7994

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function insert(item, unrefed) {
list._timer._list = list;

if (unrefed === true) list._timer.unref();
list._timer.start(msecs, 0);
list._timer.start(msecs);

lists[msecs] = list;
list._timer[kOnTimeout] = listOnTimeout;
Expand Down Expand Up @@ -173,7 +173,7 @@ function listOnTimeout() {
if (timeRemaining < 0) {
timeRemaining = 0;
}
this.start(timeRemaining, 0);
this.start(timeRemaining);
debug('%d list wait because diff is %d', msecs, diff);
return;
}
Expand Down Expand Up @@ -430,7 +430,7 @@ exports.setInterval = function(callback, repeat) {

// If timer is unref'd (or was - it's permanently removed from the list.)
if (this._handle) {
this._handle.start(repeat, 0);
this._handle.start(repeat);
} else {
timer._idleTimeout = repeat;
active(timer);
Expand Down Expand Up @@ -485,7 +485,7 @@ Timeout.prototype.unref = function() {
this._handle = handle || new TimerWrap();
this._handle.owner = this;
this._handle[kOnTimeout] = unrefdHandle;
this._handle.start(delay, 0);
this._handle.start(delay);
this._handle.domain = this.domain;
this._handle.unref();
}
Expand Down
3 changes: 1 addition & 2 deletions src/timer_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ class TimerWrap : public HandleWrap {
CHECK(HandleWrap::IsAlive(wrap));

int64_t timeout = args[0]->IntegerValue();
int64_t repeat = args[1]->IntegerValue();
int err = uv_timer_start(&wrap->handle_, OnTimeout, timeout, repeat);
int err = uv_timer_start(&wrap->handle_, OnTimeout, timeout, 0);
args.GetReturnValue().Set(err);
}

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-timer-wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var kOnTimeout = Timer.kOnTimeout;

var t = new Timer();

t.start(1000, 0);
t.start(1000);

t[kOnTimeout] = common.mustCall(function() {
console.log('timeout');
Expand Down
2 changes: 1 addition & 1 deletion test/timers/test-timers-reliability.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ monoTimer[Timer.kOnTimeout] = function() {
assert(intervalFired);
};

monoTimer.start(300, 0);
monoTimer.start(300);

setTimeout(function() {
timerFired = true;
Expand Down