(date, job)
| 218 | |
| 219 | /* Date-based scheduler */ |
| 220 | function runOnDate(date, job) { |
| 221 | const now = Date.now(); |
| 222 | const then = date.getTime(); |
| 223 | |
| 224 | return lt.setTimeout(function() { |
| 225 | if (then > Date.now()) |
| 226 | runOnDate(date, job); |
| 227 | else |
| 228 | job(); |
| 229 | }, (then < now ? 0 : then - now)); |
| 230 | } |
| 231 | |
| 232 | function scheduleInvocation(invocation) { |
| 233 | sorted.add(invocations, invocation, sorter); |
no outgoing calls
no test coverage detected
searching dependent graphs…