Merge branch 'master' of https://github.com/worklist/hifi into view_frustum_work

This commit is contained in:
ZappoMan 2013-04-12 18:28:17 -07:00
commit 1264bdf63d
2 changed files with 52 additions and 17 deletions

View file

@ -33,6 +33,53 @@
// int sampleAt;
CounterStatHistory::CounterStatHistory() :
currentCount(0),
currentDelta(0),
currentTime(0.0),
lastCount(0),
lastTime(0.0),
totalTime(0.0),
sampleAt(-1),
sampleCount(0) {
}
CounterStatHistory::CounterStatHistory(std::string myName) :
name(myName),
currentCount(0),
currentDelta(0),
currentTime(0.0),
lastCount(0),
lastTime(0.0),
totalTime(0.0),
sampleAt(-1),
sampleCount(0) {
}
CounterStatHistory::CounterStatHistory(std::string myName, double initialTime, long initialCount) :
name(myName),
currentCount(initialCount),
currentDelta(0),
currentTime(initialTime),
lastCount(initialCount),
lastTime(initialTime),
totalTime(initialTime),
sampleAt(-1),
sampleCount(0) {
}
void CounterStatHistory::init() {
currentCount = 0;
currentDelta = 0;
currentTime = 0.0;
lastCount = 0;
lastTime = 0.0;
totalTime = 0.0;
sampleAt = -1;
sampleCount = 0;
}
void CounterStatHistory::recordSample(long thisCount) {
timeval now;
gettimeofday(&now,NULL);

View file

@ -25,23 +25,9 @@ class CounterStatHistory {
public:
std::string name;
CounterStatHistory(std::string myName):
currentCount(0), currentDelta(0),currentTime(0.0),
lastCount(0),lastTime(0.0),
totalTime(0.0),
sampleAt(-1), sampleCount(0), name(myName) {};
CounterStatHistory():
currentCount(0), currentDelta(0),currentTime(0.0),
lastCount(0),lastTime(0.0),
totalTime(0.0),
sampleAt(-1), sampleCount(0) {};
CounterStatHistory(std::string myName, double initialTime, long initialCount) :
currentCount(initialCount), currentDelta(0), currentTime(initialTime),
lastCount(initialCount),lastTime(initialTime),
totalTime(initialTime),
sampleAt(-1), sampleCount(0), name(myName) {};
CounterStatHistory();
CounterStatHistory(std::string myName);
CounterStatHistory(std::string myName, double initialTime, long initialCount);
void recordSample(long thisCount);
void recordSample(double thisTime, long thisCount);
@ -58,6 +44,8 @@ public:
return currentCount;
};
private:
void init();
long currentCount;
long currentDelta;
double currentTime;