Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/stats.cc21
-rw-r--r--src/core/stats.h27
2 files changed, 48 insertions, 0 deletions
diff --git a/src/core/stats.cc b/src/core/stats.cc
new file mode 100644
index 0000000..0e6a15b
--- /dev/null
+++ b/src/core/stats.cc
@@ -0,0 +1,21 @@
+/*
+ core/stats.cc
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#include "core/stats.h"
+
+namespace core {
+
+unsigned int Stats::network_bytes_sent = 0;
+unsigned int Stats::network_bytes_received = 0;
+
+void Stats::clear()
+{
+ network_bytes_sent = 0;
+ network_bytes_received = 0;
+};
+
+}
+
diff --git a/src/core/stats.h b/src/core/stats.h
new file mode 100644
index 0000000..44153ec
--- /dev/null
+++ b/src/core/stats.h
@@ -0,0 +1,27 @@
+/*
+ core/stats.h
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#ifndef __INCLUDED_CORE_STATS_H__
+#define __INCLUDED_CORE_STATS_H__
+
+/// this namespace contains the network subsystem
+namespace core
+{
+
+/// class to gather various engine statistics
+class Stats {
+public:
+ /// clear statistics
+ static void clear();
+
+ static unsigned int network_bytes_sent;
+ static unsigned int network_bytes_received;
+};
+
+}
+
+#endif // __INCLUDED_CORE_STATS_H__
+