Humanizer.Bytes.ByteRate
ByteRate Class
Class to hold a ByteSize and a measurement interval, for the purpose of calculating the rate of transfer
public class ByteRate
Inheritance System.Object → ByteRate
Constructors
ByteRate(ByteSize, TimeSpan) Constructor
Create a ByteRate with given quantity of bytes across an interval
public ByteRate(Humanizer.Bytes.ByteSize size, System.TimeSpan interval);
Parameters
size ByteSize
interval System.TimeSpan
Properties
ByteRate.Interval Property
Interval that bytes were transferred in
public System.TimeSpan Interval { get; }
Property Value
ByteRate.Size Property
Quantity of bytes
public Humanizer.Bytes.ByteSize Size { get; }
Property Value
Methods
ByteRate.Humanize(TimeUnit) Method
Calculate rate for the quantity of bytes and interval defined by this instance
public string Humanize(Humanizer.Localisation.TimeUnit timeUnit=Humanizer.Localisation.TimeUnit.Second);
Parameters
timeUnit TimeUnit
Unit of time to calculate rate for (defaults is per second)
Returns
ByteRate.Humanize(string, TimeUnit) Method
Calculate rate for the quantity of bytes and interval defined by this instance
public string Humanize(string format, Humanizer.Localisation.TimeUnit timeUnit=Humanizer.Localisation.TimeUnit.Second);
Parameters
format System.String
The string format to use for the number of bytes
timeUnit TimeUnit
Unit of time to calculate rate for (defaults is per second)