vanil-stopwatch-js v1.0.1
"vanil-stopwatch-js" is a simple (Similar to dotnet's) stopwatch library for monitoring performance. Both node.js and browser compatible.
You can get the latest release from the official npmjs.com feed or from the github releases page.
Getting Started
Importing the module
Node.js:
// Import the module.var Stopwatch = ;
Browser:
<!-- Import the script file (Prefer the minimized version of the module) -->
Initialization and starting the measurement
Option 1:
// Import the module.var Stopwatch = ; // Initialize an instance.var sw = ; // Start the measurement.swstart;
Option 2:
// Import the module.var Stopwatch = ; // Initialize an instance and start it immediately.var sw = true;
Getting the elapsed time
// Import the module.var Stopwatch = ; // Initialize an instance and start it immediately.var sw = true; // Do an async process.
Splitting the measurement
You can split the measurement to laps while it runs.
// Import the module.var Stopwatch = ; // Initialize an instance and start it immediately.var sw = true; // Do two different process sequentially. // Process #1
Versioning
Used SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Deniz Kanmaz (denizkanmaz@gmail.com) - Initial work
License
This project is licensed under the MIT Licece - see the LICENSE.md file for details.
NOTICE: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.