Permalink
Browse files

docs

  • Loading branch information...
emerleite committed Dec 13, 2011
1 parent 8a43850 commit 2977632dc6e2825686ccc397becb91f819dacb84
Showing with 11 additions and 8 deletions.
  1. +11 −8 Readme.md
View
@@ -30,14 +30,17 @@ stopwatch.on('end, function() {
### Managed
If you want a managed instance you only need to require the module and use the get function.
- var StopwatchManager = require('stopwatch');
- var stopwatch = StopwatchManager.get(1, {seconds: 1, interval: 0});
- stopwatch.on('tick', function(secondsLeft) {
- //when one second pass.
- });
- stopwatch.on('end, function() {
- //when the time ends
- });
+
+```js
+var StopwatchManager = require('stopwatch');
+var stopwatch = StopwatchManager.get(1, {seconds: 1, interval: 0});
+stopwatch.on('tick', function(secondsLeft) {
+ //when one second pass.
+});
+stopwatch.on('end, function() {
+ //when the time ends
+});
+```
### Examples
See the test folder. I'll write more example in a examples folder.

0 comments on commit 2977632

Please sign in to comment.