MCPcopy Create free account
hub / github.com/nodejs/nan / NAN_METHOD

Function NAN_METHOD

test/cpp/asyncresource.cpp:51–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51NAN_METHOD(Delay) {
52 int delay = To<int>(info[0]).FromJust();
53 v8::Local<v8::Function> cb = To<v8::Function>(info[1]).ToLocalChecked();
54
55 DelayRequest* delay_request = new DelayRequest(delay, cb);
56
57 uv_queue_work(
58 GetCurrentEventLoop()
59 , &delay_request->request
60 , Delay
61 , reinterpret_cast<uv_after_work_cb>(AfterDelay));
62}
63
64NAN_MODULE_INIT(Init) {
65 Set(target, New<v8::String>("delay").ToLocalChecked(),

Callers

nothing calls this directly

Calls 3

GetCurrentEventLoopFunction · 0.85
FromJustMethod · 0.80
ToLocalCheckedMethod · 0.80

Tested by

no test coverage detected