Logo white

Peter M. Groen / FlashMQ

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • FlashMQ
  • globalstats.cpp
  • Add stats about connection count in $SYS ...
    e2ea3ea8
    This required adding a global stats object.
    
    It also contains a bit of refactor to make a type out of the derived
    counters.
    Wiebe Cazemier authored
    2022-06-21 07:44:24 +0200  
    Browse Code ยป
globalstats.cpp 279 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include "globalstats.h"

GlobalStats *GlobalStats::instance = nullptr;

GlobalStats::GlobalStats()
{

}

GlobalStats *GlobalStats::getInstance()
{
    if (GlobalStats::instance == nullptr)
        GlobalStats::instance = new GlobalStats();

    return GlobalStats::instance;
}