horloge
v1.0.0
Published
A simple timer utility.
Downloads
3
Readme
⏲ Horloge
Horloge means timer in French 🇫🇷, and is a simple timer utility.
Installation
npm install horlogeUsage
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 [email protected]:hugomd/horloge.gitnpm install- Make your changes
- Open a pull request and ask for review ✌️
- Optional: use emoji in your commits 🔥
