Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hugomd/horloge
⏲️ A simple timer utility.
https://github.com/hugomd/horloge
nodejs timer utility
Last synced: about 2 months ago
JSON representation
⏲️ A simple timer utility.
- Host: GitHub
- URL: https://github.com/hugomd/horloge
- Owner: hugomd
- License: mit
- Created: 2017-10-24T03:45:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-22T15:26:19.000Z (almost 7 years ago)
- Last Synced: 2024-04-14T05:54:04.660Z (9 months ago)
- Topics: nodejs, timer, utility
- Language: JavaScript
- Homepage: https://hugomd.github.io/horloge/Constructor.html
- Size: 58.6 KB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ⏲ Horloge
[![npm](https://img.shields.io/npm/v/horloge.svg?maxAge=2592000)](https://www.npmjs.com/package/horloge) [![Build Status](https://travis-ci.org/hugomd/horloge.svg?branch=master)](https://travis-ci.org/hugomd/horloge/builds) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)> _Horloge_ means clock in French 🇫🇷, and is a simple timer utility.
# Installation
```javascript
npm install horloge
```# Usage
```javascript
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.git`
* `npm install`
* Make your changes
* Open a pull request and ask for review ✌️
* Optional: use emoji in your commits 🔥