org.apache.ignite.internal.util

## Class GridTimer

- java.lang.Object
- - org.apache.ignite.internal.util.GridTimer

    public class GridTimer
    extends Object

Timer to use mostly for debugging purposes.

### Constructor Summary

Constructors
Constructor and Description
`GridTimer(String name)`
`GridTimer(String name, long threshold)`

### Method Summary

Methods
`long` `duration()`
`long` `endTime()`
`boolean` `maxedOut()`
`String` `name()`
`long` `startTime()`
`long` `stop()` Stops this timer.
`boolean` `stopx()` Stops this timer.
`long` `threshold()`
`String` `toString()`

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

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

### Constructor Detail

#### GridTimer

    public GridTimer(String name)

Parameters:
  `name` - Timer name.

#### GridTimer

    public GridTimer(String name,
             long threshold)

Parameters:
  `name` - Timer name.
  `threshold` - Max duration threshold.

### Method Detail

#### stop

    public long stop()

Stops this timer.

Returns:
  Duration.

#### stopx

    public boolean stopx()

Stops this timer.

Returns:
  `True` if didn't max out.

#### maxedOut

    public boolean maxedOut()

Returns:
  `True` if maxed out.

#### duration

    public long duration()

Returns:
  Timer duration.

#### endTime

    public long endTime()

Returns:
  End time ({@code -1 if not stopped).

#### startTime

    public long startTime()

Returns:
  Start time.

#### threshold

    public long threshold()

Returns:
  Max duration threshold.

#### name

    public String name()

Returns:
  Timer name.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015