Skip to content

Commit

Permalink
timers: remove unused Timer.getRepeat()
Browse files Browse the repository at this point in the history
PR-URL: #2256
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
bnoordhuis committed Jul 27, 2015
1 parent f2c83bd commit bcce5cf
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/timer_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class TimerWrap : public HandleWrap {

env->SetProtoMethod(constructor, "start", Start);
env->SetProtoMethod(constructor, "stop", Stop);
env->SetProtoMethod(constructor, "getRepeat", GetRepeat);
env->SetProtoMethod(constructor, "again", Again);

target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Timer"),
Expand Down Expand Up @@ -100,18 +99,6 @@ class TimerWrap : public HandleWrap {
args.GetReturnValue().Set(err);
}

static void GetRepeat(const FunctionCallbackInfo<Value>& args) {
TimerWrap* wrap = Unwrap<TimerWrap>(args.Holder());

CHECK(HandleWrap::IsAlive(wrap));

int64_t repeat = uv_timer_get_repeat(&wrap->handle_);
if (repeat <= 0xfffffff)
args.GetReturnValue().Set(static_cast<uint32_t>(repeat));
else
args.GetReturnValue().Set(static_cast<double>(repeat));
}

static void OnTimeout(uv_timer_t* handle) {
TimerWrap* wrap = static_cast<TimerWrap*>(handle->data);
Environment* env = wrap->env();
Expand Down

0 comments on commit bcce5cf

Please sign in to comment.