Browse Source

timers: remove unused Timer.getRepeat()

PR-URL: https://github.com/nodejs/io.js/pull/2256
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
v4.0.0-rc
Ben Noordhuis 10 years ago
parent
commit
bcce5cf9bb
  1. 13
      src/timer_wrap.cc

13
src/timer_wrap.cc

@ -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"),
@ -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();

Loading…
Cancel
Save