Table of Contents

Method Calculate

Namespace
Skyline.DataMiner.Utils.Rates.Common
Assembly
Skyline.DataMiner.Utils.Rates.Common.dll

Calculate(ulong, TimeSpan, double)

Calculates the rate using provided newCounter against previous counters buffered in this Rate64OnTimeSpan instance.

public double Calculate(ulong newCounter, TimeSpan delta, double faultyReturn = -1)

Parameters

newCounter ulong

The latest known counter value.

delta TimeSpan

The elapse TimeSpan between this new counter and previous one.

faultyReturn double

The value to be returned in case a correct rate could not be calculated.

Returns

double

The calculated rate or the value specified in faultyReturn in case the rate can not be calculated.