Esempio n. 1
0
        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);
        }
Esempio n. 3
0
 /// <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;
     }
 }
Esempio n. 4
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);
        }
Esempio n. 5
0
 /// <summary>
 ///     Empty constructor, because thats constructive
 /// </summary>
 public BandwidthCounter()
 {
     perSecond = new MiniCounter {
         LastRead = DateTime.Now, Totalbytes = 0
     };
 }
Esempio n. 6
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;
 }
Esempio n. 7
0
 /// <summary>
 ///     Empty constructor, because thats constructive
 /// </summary>
 public BandwidthCounter()
 {
     perSecond = new MiniCounter {LastRead = DateTime.Now, Totalbytes = 0};
 }