Restructured src folder to be more clean

This commit is contained in:
seefo
2018-01-11 04:17:47 -05:00
parent e99d0f02a8
commit 3e3d18d318
20987 changed files with 5 additions and 1940589 deletions
@@ -0,0 +1,45 @@
#include "Statistics.h"
#ifdef EXTERNAL_DISTRO
namespace NAMESPACE
{
#endif
namespace Base
{
CStatisticTimer::CStatisticTimer(bool running) :
mTotal(0),
mStart(getTimer()),
mRunning(running)
{
}
double CStatisticTimer::GetTime()
{
uint64 total = mTotal;
if (mRunning)
total += getTimer()-mStart;
return (double)((int64)(total/getTimerFrequency()));
}
uint64 CStatisticTimer::GetFraction(uint32 fraction)
{
uint64 total = mTotal;
if (mRunning)
total += getTimer()-mStart;
if (fraction == 0)
return total;
else
return total/(getTimerFrequency()/fraction);
}
};
#ifdef EXTERNAL_DISTRO
};
#endif