Skip to main content

NewNetworkingProfiler.NetworkStat

A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

A per-second rate worked out from a running total, used by the obsolete NewNetworkingProfiler for bytes and packets sent and received.

Constructors​

MemberWhat it is
NetworkStat()Creates a NewNetworkingProfiler.NetworkStat with default values.

Fields​

3 private and internal fields
MemberWhat it is
private DateTime cachedRecordTimeWhen the total was last read.
private float cachedValueThe total at the last read.
private Func<int> getValueReads the running total, such as the socket's outgoing byte count.

Properties​

MemberWhat it is
float Output { get; private set; }The last rate worked out, per second.

Methods​

MemberWhat it is
void CacheStat()Reads the total again and sets Output to the change per second since the last read.
void Init(Func<int> getValue)Sets the function that reads the total and takes a first reading.

Used in​

Members of other types that take, return or hold a NetworkStat: