1.0.0 • Published 7 years ago
horloge v1.0.0
⏲ Horloge
Horloge means timer in French 🇫🇷, and is a simple timer utility.
Installation
npm install horloge
Usage
const Horloge = require('horloge');
// Using an async function so we can use await
(async () => {
const delay = duration =>
new Promise(resolve => setTimeout(resolve, duration));
let t = new Horloge();
t.start();
await delay(1000);
t.stop();
t.log(); // Timer took ~1000 ms
})();
Contributing
git clone git@github.com:hugomd/horloge.git
npm install
- Make your changes
- Open a pull request and ask for review ✌️
- Optional: use emoji in your commits 🔥
1.0.0
7 years ago