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

Class DelayRequest

test/cpp/callbackcontext.cpp:15–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13using namespace Nan; // NOLINT(build/namespaces)
14
15class DelayRequest : public AsyncResource {
16 public:
17 DelayRequest(int milliseconds_, v8::Local<v8::Function> callback_)
18 : AsyncResource("nan:test.DelayRequest"),
19 callback(callback_),
20 milliseconds(milliseconds_) {
21 request.data = this;
22 }
23 ~DelayRequest() {}
24
25 Callback callback;
26 uv_work_t request;
27 int milliseconds;
28};
29
30void Delay(uv_work_t* req) {
31 DelayRequest *delay_request = static_cast<DelayRequest*>(req->data);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected