Package org.springframework.util

# Class StopWatch.TaskInfo

java.lang.Object
org.springframework.util.StopWatch.TaskInfo

Enclosing class:
  StopWatch

public static final class StopWatch.TaskInfo extends Object
Nested class to hold data about one task executed within the `StopWatch`.

## Method Summary

Modifier and Type
Method
Description
`String`
`getTaskName()`
Get the name of this task.
`double`
`getTime(TimeUnit timeUnit)`
Get the time this task took in the requested time unit (with decimal points in nanosecond precision).
`long`
`getTimeMillis()`
Get the time this task took in milliseconds.
`long`
`getTimeNanos()`
Get the time this task took in nanoseconds.
`double`
`getTimeSeconds()`
Get the time this task took in seconds.

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

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

## Method Details

### getTaskName

public String getTaskName()
Get the name of this task.

### getTimeNanos

public long getTimeNanos()
Get the time this task took in nanoseconds.

Since:
  5.2
See Also:
  - `getTime(TimeUnit)`

### getTimeMillis

public long getTimeMillis()
Get the time this task took in milliseconds.

See Also:
  - `getTime(TimeUnit)`

### getTimeSeconds

public double getTimeSeconds()
Get the time this task took in seconds.

See Also:
  - `getTime(TimeUnit)`

### getTime

public double getTime(TimeUnit timeUnit)
Get the time this task took in the requested time unit (with decimal points in nanosecond precision).

Parameters:
  `timeUnit` - the unit to use
Since:
  6.1
See Also:
  - `getTimeNanos()`
  - `getTimeMillis()`
  - `getTimeSeconds()`