Skip to content

Priytam/stopwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9432e8e · Jun 14, 2020

History

12 Commits
Jun 13, 2020
Jun 13, 2020
Jun 13, 2020
Jun 14, 2020
Jun 14, 2020
Jun 14, 2020
Jun 14, 2020
Jun 14, 2020
Jun 14, 2020
Jun 13, 2020
Jun 13, 2020
Jun 13, 2020

Repository files navigation

Stop Watch

A java library that provides thread safe implimentation of stop watch

GitHub license Build Status Maven Central

HitCount Open Source Love svg2 Maintenance

Usage of stop watch

  • Maven dependency
<dependency>
  <groupId>com.github.priytam</groupId>
  <artifactId>stopwatch</artifactId>
  <version>1.0.0</version>
</dependency>
  • Gradle dependency
compile 'com.github.priytam:stopwatch:1.0.0'
  • Example
IStopWatch stopWatch = StopWatch.create();
stopWatch.id(); // id of watch
stopWatch.start(); //Start a watch
stopWatch.elapsedMillis(); // Time elapsed till now

// Pause and Start
stopWatch.pause();
stopWatch.start();

stopWatch.restart(); // Restart a watch

stopWatch.stop(); // Stop a watch

Releases

No releases published

Packages

No packages published

Languages