Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meixg/time-marker
设置序列,进行时间标记。序列标记齐全后执行相应操作,可用于进行时间序列打点。
https://github.com/meixg/time-marker
Last synced: 16 days ago
JSON representation
设置序列,进行时间标记。序列标记齐全后执行相应操作,可用于进行时间序列打点。
- Host: GitHub
- URL: https://github.com/meixg/time-marker
- Owner: meixg
- Created: 2019-03-28T05:42:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-14T03:45:28.000Z (over 5 years ago)
- Last Synced: 2024-05-01T17:13:18.492Z (9 months ago)
- Language: TypeScript
- Size: 50.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tmarker
mark sequence time easily.
## quick start
```javascript
import {TimeMarker} from 'tmarker';const marker = new TimeMarker(['a', 'b', 'c'], data => {
console.log(data);
});marker.mark('a');
setTimeout(() => {
marker.mark('b');
}, 500);
setTimeout(() => {
marker.mark('c'); // callback get { b: 507, c: 1003 }
}, 1000);
```