Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kamahl19/long-settimeout
Long timeout makes it possible to have a timeout that is longer than 24.8 days (2^31-1 milliseconds).
https://github.com/kamahl19/long-settimeout
schedule scheduler settimeout timeout timer
Last synced: 1 day ago
JSON representation
Long timeout makes it possible to have a timeout that is longer than 24.8 days (2^31-1 milliseconds).
- Host: GitHub
- URL: https://github.com/kamahl19/long-settimeout
- Owner: Kamahl19
- License: mit
- Created: 2020-03-25T13:23:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T21:37:38.000Z (over 4 years ago)
- Last Synced: 2024-09-27T14:47:19.891Z (about 2 months ago)
- Topics: schedule, scheduler, settimeout, timeout, timer
- Language: TypeScript
- Size: 118 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# long-settimeout
[![Master CI Status](https://github.com/Kamahl19/long-settimeout/workflows/CI/badge.svg?branch=master)](https://github.com/Kamahl19/long-settimeout/actions?query=workflow%3ACI+branch%3Amaster)
[![Latest version](https://badgen.net/npm/v/long-settimeout)](https://www.npmjs.com/package/long-settimeout)
[![Supported Node version](https://badgen.net/npm/node/long-settimeout)](https://nodejs.org/en/about/releases/)Long timeout makes it possible to have a timeout that is longer than 24.8 days (2^31-1 milliseconds).
## Installation
```
yarn add long-settimeout
```## Usage
```js
import { setLongTimeout, clearLongTimeout } from 'long-settimeout';const timeout = setLongTimeout(() => {
console.log('in 30 days');
}, 1000 * 60 * 60 * 24 * 30);clearLongTimeout(timeout);
```## Local Development
### `yarn start`
Runs the project in development/watch mode. Your library will be rebuilt upon changes.
### `yarn build`
Bundles the package to the `dist` folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).
### `yarn test`
Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.
## License
This is open source software [licensed as MIT](https://github.com/Kamahl19/long-settimeout/blob/master/LICENSE).