Skip to content

A clock helper for querying the time of startup and shutdown

License

Notifications You must be signed in to change notification settings

keqingrong/clock-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clock-helper

npm version

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

  • Support for macOS/Linux
  • CLI
  • Add unit test cases

License

MIT © Qingrong Ke

References

About

A clock helper for querying the time of startup and shutdown

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published