summaryrefslogtreecommitdiffstats
path: root/src/src/knetstatsview.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-03-12 12:00:08 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-03-12 12:07:10 -0500
commitc903aeab541d6a6d0c41f78d06917523c84c167d (patch)
tree1a7473d58e7d977d41af0ff6f57a401dae1343c8 /src/src/knetstatsview.h
parent7f6ac0ab640e0690d103cca2cd62bc8d99bce645 (diff)
downloadknetstats-c903aeab541d6a6d0c41f78d06917523c84c167d.tar.gz
knetstats-c903aeab541d6a6d0c41f78d06917523c84c167d.zip
Fix counter overflow at 4GB
Add GB range to byte counters
Diffstat (limited to 'src/src/knetstatsview.h')
-rw-r--r--src/src/knetstatsview.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/src/knetstatsview.h b/src/src/knetstatsview.h
index a0dab81..e8cc0b8 100644
--- a/src/src/knetstatsview.h
+++ b/src/src/knetstatsview.h
@@ -1,5 +1,6 @@
/***************************************************************************
-* Copyright (C) 2004-2005 by Hugo Parente Lima *
+* (c) 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net> *
+* Copyright (C) 2004-2005 by Hugo Parente Lima *
* hugo_pl@users.sourceforge.net *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -15,7 +16,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef KNETSTATSVIEW_H
@@ -109,13 +110,13 @@ public:
inline Mode viewMode() const;
/// Total of bytes receiveds
- inline unsigned int totalBytesRx() const;
+ inline unsigned long totalBytesRx() const;
/// Total of bytes transmitted
- inline unsigned int totalBytesTx() const;
+ inline unsigned long totalBytesTx() const;
/// Total of packets receiveds
- inline unsigned int totalPktRx() const;
+ inline unsigned long totalPktRx() const;
/// Total of packets transmitted
- inline unsigned int totalPktTx() const;
+ inline unsigned long totalPktTx() const;
/// RX Speed in bytes per second
inline double byteSpeedRx() const;
/// TX Speed in bytes per second
@@ -224,19 +225,19 @@ KNetStatsView::Mode KNetStatsView::viewMode() const {
return mOptions.mViewMode;
}
-unsigned int KNetStatsView::totalBytesRx() const {
+unsigned long KNetStatsView::totalBytesRx() const {
return mTotalBytesRx;
}
-unsigned int KNetStatsView::totalBytesTx() const {
+unsigned long KNetStatsView::totalBytesTx() const {
return mTotalBytesTx;
}
-unsigned int KNetStatsView::totalPktRx() const {
+unsigned long KNetStatsView::totalPktRx() const {
return mTotalPktRx;
}
-unsigned int KNetStatsView::totalPktTx() const {
+unsigned long KNetStatsView::totalPktTx() const {
return mTotalPktTx;
}