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