public ulong GetPerSecondNumeric() { ulong val = perSecond.BytesPerSec(); perSecond = new MiniCounter(); return(val); }
/// <summary> /// Accesses the current transfer rate, returning the text /// </summary> /// <returns></returns> public string GetPerSecond() { string s = perSecond.ToString() + "/s"; perSecond = new MiniCounter(); return(s); }
/// <summary> /// Accesses the current transfer rate, returning the text /// </summary> /// <returns></returns> public string GetPerSecond() { lock (this) { string s = perSecond.ToString() + "/s"; perSecond = new MiniCounter(); return s; } }
/// <summary> /// Accesses the current transfer rate, returning the text /// </summary> /// <returns></returns> public string GetPerSecond() { var s = perSecond + "/s"; perSecond = new MiniCounter { LastRead = DateTime.Now, Totalbytes = 0 }; return(s); }
/// <summary> /// Empty constructor, because thats constructive /// </summary> public BandwidthCounter() { perSecond = new MiniCounter { LastRead = DateTime.Now, Totalbytes = 0 }; }
/// <summary> /// Accesses the current transfer rate, returning the text /// </summary> /// <returns></returns> public string GetPerSecond() { var s = perSecond + "/s"; perSecond = new MiniCounter {LastRead = DateTime.Now, Totalbytes = 0}; return s; }
/// <summary> /// Empty constructor, because thats constructive /// </summary> public BandwidthCounter() { perSecond = new MiniCounter {LastRead = DateTime.Now, Totalbytes = 0}; }