diff --git a/BCL.csproj b/BCL.csproj index b84d0656c..372a36940 100644 --- a/BCL.csproj +++ b/BCL.csproj @@ -208,6 +208,9 @@ + + + commonjs True diff --git a/timer/Readme.md b/timer/Readme.md index e3364367f..84afd116b 100644 --- a/timer/Readme.md +++ b/timer/Readme.md @@ -13,4 +13,20 @@ var intervalId = setInterval(function(){ log("Test"); }, 2000); ... clearInterval(intervalId) +``` +OR +```js + var timer = require("timer"); + + timer.setTimeout(function(){ log("Test"); }, 2000); + + var id = timer.setTimeout(function(){ log("Test"); }, 2000); + ... + timer.clearTimeout(id); + + timer.setInterval(function(){ log("Test"); }, 2000); + + var intervalId = timer.setInterval(function(){ log("Test"); }, 2000); + ... + timer.clearInterval(intervalId) ``` \ No newline at end of file