clock-helper
v1.0.0
Published
A clock helper for querying the time of startup and shutdown
Downloads
14
Maintainers
Readme
clock-helper
A clock helper for querying the time of startup and shutdown
Installation
$ npm install clock-helper
Usage
const { getShutdownDateList } = require('clock-helper');
(async () => {
try {
const osShutdownDateList = await getShutdownDateList();
console.log(osShutdownDateList));
// [ 2019-08-24T13:58:43.968Z,
// 2019-08-24T04:51:14.941Z,
// 2019-08-22T15:16:36.939Z,
// 2019-08-21T15:43:08.332Z,
// 2019-08-18T15:35:03.466Z ]
} catch(err) {
console.error(err);
}
})();
API
- getStartupDateList()
- getShutdownDateList()
TODO
- [x] Support for macOS/Linux
- [x] CLI
- [ ] Add unit test cases
License
MIT © Qingrong Ke