{"comment":{"url":"https://api.github.com/repos/yanenkoa/jstimevirtualizer/comments/13025022","html_url":"https://github.com/yanenkoa/jstimevirtualizer/commit/27937e6e98a841011881e9b89ebc6c89c2cb2486#commitcomment-13025022","id":13025022,"user":{"login":"eabatalov","id":623590,"avatar_url":"https://avatars.githubusercontent.com/u/623590?v=3","gravatar_id":"","url":"https://api.github.com/users/eabatalov","html_url":"https://github.com/eabatalov","followers_url":"https://api.github.com/users/eabatalov/followers","following_url":"https://api.github.com/users/eabatalov/following{/other_user}","gists_url":"https://api.github.com/users/eabatalov/gists{/gist_id}","starred_url":"https://api.github.com/users/eabatalov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eabatalov/subscriptions","organizations_url":"https://api.github.com/users/eabatalov/orgs","repos_url":"https://api.github.com/users/eabatalov/repos","events_url":"https://api.github.com/users/eabatalov/events{/privacy}","received_events_url":"https://api.github.com/users/eabatalov/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"27937e6e98a841011881e9b89ebc6c89c2cb2486","created_at":"2015-09-02T14:41:03Z","updated_at":"2015-09-02T14:41:03Z","body":"But it has some bad bugs:\r\nYou've lost additional optional parameters for setInterval and setTimeout:\r\n+TimeVirtualizer.prototype._setInterval = function(func, delayMS) {\r\n+    return this._setIntervalOrTimeout(func, delayMS, true);\r\n+};\r\n+\r\n\r\nFrom MDN: window.setInterval(func, delay[, param1, param2, ...]);\r\nwindow.setTimeout(func, [delay, param1, param2, ...]);\r\nsetInterval shouldn't work if delay param is not provided.\r\n--------------------------------------------\r\n\r\nYou provide\r\nvar timeout = new Timeout(\r\n-        this._reals.setTimeout, this._clearTimeout,\r\n+        realFunc, this._clearInterval,\r\n-        false, delayMS, func, funcParams);\r\n+        isPeriodic, delayMS, func, funcParams);\r\n+\r\n\r\n this._clearInterval as \"virtualizer kill me func\" both for periodic and not periodic timer."}}