Class AtomicCounter
Atomic counter class used for incrementing and decrementing long
integer values.
Inheritance
System.Object
AtomicCounter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NBench.Util
Assembly: NBench.dll
Syntax
public class AtomicCounter
Constructors
AtomicCounter(Int64)
Declaration
public AtomicCounter(long seed = 0L)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | seed |
Fields
Value
Declaration
protected long Value
Field Value
Type | Description |
---|---|
System.Int64 |
Properties
Current
Declaration
public long Current { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
Decrement()
Declaration
public void Decrement()
Decrement(Int64)
Declaration
public void Decrement(long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value |
GetAndIncrement()
Declaration
public long GetAndIncrement()
Returns
Type | Description |
---|---|
System.Int64 |
Increment()
Declaration
public void Increment()
Increment(Int64)
Declaration
public void Increment(long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value |