(config, globalCtx)
| 3726 | var llx = require("lolex"); |
| 3727 | |
| 3728 | function createClock(config, globalCtx) { |
| 3729 | var llxCtx = llx; |
| 3730 | if (globalCtx !== null && typeof globalCtx === "object") { |
| 3731 | llxCtx = llx.withGlobal(globalCtx); |
| 3732 | } |
| 3733 | var clock = llxCtx.install(config); |
| 3734 | clock.restore = clock.uninstall; |
| 3735 | return clock; |
| 3736 | } |
| 3737 | |
| 3738 | /** |
| 3739 | * @param {number|Date|Object} dateOrConfig The unix epoch value to install with (default 0) |
no test coverage detected