Package htsjdk.samtools.util

# Class StopWatch

java.lang.Object
htsjdk.samtools.util.StopWatch

public class StopWatch extends Object
Utility to help in performance testing.

## Constructor Summary

Constructors
Constructor
Description
`StopWatch()`

## Method Summary

Modifier and Type
Method
Description
`long`
`getElapsedTime()`
Returns the cumulative time between all the start() and stop() calls made to this object.
`long`
`getElapsedTimeSecs()`
`void`
`reset()`
`void`
`start()`
`void`
`stop()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### StopWatch

public StopWatch()

## Method Details

### start

public void start()

### stop

public void stop()

### reset

public void reset()

### getElapsedTime

public long getElapsedTime()
Returns the cumulative time between all the start() and stop() calls made to this object. If the StopWatch is currently running, also includes the time between the most recent start() and now.

Returns:
  elapsedTime in milliseconds

### getElapsedTimeSecs

public long getElapsedTimeSecs()

Returns:
  same as getElapsedTime(), but truncated to seconds.