diff options
Diffstat (limited to 'src/Stats.cxx')
-rw-r--r-- | src/Stats.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Stats.cxx b/src/Stats.cxx index 940a984da..6d406a438 100644 --- a/src/Stats.cxx +++ b/src/Stats.cxx @@ -37,6 +37,8 @@ static unsigned start_time; #endif +#ifdef ENABLE_DATABASE + static DatabaseStats stats; enum class StatsValidity : uint8_t { @@ -45,6 +47,8 @@ enum class StatsValidity : uint8_t { static StatsValidity stats_validity = StatsValidity::INVALID; +#endif + void stats_global_init(void) { #ifndef WIN32 @@ -52,6 +56,8 @@ void stats_global_init(void) #endif } +#ifdef ENABLE_DATABASE + void stats_invalidate() { @@ -120,6 +126,8 @@ db_stats_print(Client &client) (unsigned long)update_stamp); } +#endif + void stats_print(Client &client) { @@ -133,6 +141,8 @@ stats_print(Client &client) #endif (unsigned long)(client.player_control.GetTotalPlayTime() + 0.5)); +#ifdef ENABLE_DATABASE if (GetDatabase() != nullptr) db_stats_print(client); +#endif } |