anchor.diff:      net_stats = 0.0 :: float(),
       cpu_last = [] :: [{Name :: binary(), WorkJiffies :: integer(), TotalJiffies :: integer()}],
       net_last = [] :: [{Name :: binary(), Value :: integer()}],
  -    net_maxspeed = 10 * 1024 * 1024 :: integer(),
       last_update = {0, 0, 0} :: {integer(), integer(), integer()} % Timestamp of the last measurement
   }).
   
  
positive.code: calculate_network_stats([{tx_p, Name, StatA} | CurrentNetworkStats], [{tx_p, Name, StatB} | NetworkStats], Stats, TimeElapsed) ->
      calculate_network_stats(CurrentNetworkStats, NetworkStats, [{<<"net_tx_pps_", Name/binary>>, (StatA - StatB) / TimeElapsed} | Stats], TimeElapsed);
  % maxspeed is maximum interface throughput, considering duplex mode
  calculate_network_stats([{maxspeed, Name, MaxSpeed} | CurrentNetworkStats], [{maxspeed, Name, _} | NetworkStats], Stats, TimeElapsed) ->
      calculate_network_stats(CurrentNetworkStats, NetworkStats, [{<<"net_maxthp_", Name/binary>>, MaxSpeed} | Stats], TimeElapsed);
  calculate_network_stats([{NameA, _} | CurrentNetworkStats], [{NameB, _} | NetworkStats], Stats, TimeElapsed) when NameA > NameB ->
      calculate_network_stats(CurrentNetworkStats, NetworkStats, Stats, TimeElapsed);
  
negative.code:                       {ok, <<"full\n">>} -> 2;
                        _ -> 1
                    end,
      IntSpeedMbps = case file:read_file(?NET_SPEED_FILE(Interface)) of
                       {ok, SpeedBin} ->
                           binary_to_integer(binary:part(SpeedBin, 0, byte_size(SpeedBin) - 1));
                       _ ->
                           10
                   end,
      % IntSpeedMbps is in Mbps so (IntSpeedMbps * 131072) is in Bytes/s
      IntSpeedMbps * 131072 * DuplexRatio * TimeElapsed.
  
  
  %%--------------------------------------------------------------------
  