From 716e482e2082700ba5a5c53a7273ea29d7cede30 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Sat, 10 May 2014 16:37:02 +0300 Subject: [PATCH] readme updated --- BCL.csproj | 3 +++ timer/Readme.md | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) 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