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