ConfigUtility now supports recursion; is a Singleton
If you have "config.next" set, the config system will load that as another config file. Higher config files have a higher precedence over subfiles when conflicting keys are encountered. * Added singleton.hpp, containing Singleton<T> * ConfigUtility now inherits from Singleton * Tweaked timer.*pp layouts
This commit is contained in:
@@ -21,9 +21,25 @@
|
||||
*/
|
||||
#include "timer.hpp"
|
||||
|
||||
Timer::Timer(): start(Timer::Clock::now()) {
|
||||
//
|
||||
}
|
||||
|
||||
Timer::Timer(std::string s): name(s), start(Timer::Clock::now()) {
|
||||
//
|
||||
}
|
||||
|
||||
void Timer::Start() {
|
||||
start = Clock::now();
|
||||
}
|
||||
|
||||
void Timer::Stop() {
|
||||
timeSpan = Clock::now() - start;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, Timer& t) {
|
||||
os << t.GetName() << ": ";
|
||||
os << std::chrono::duration_cast<std::chrono::nanoseconds>(t.GetTime()).count();
|
||||
os << "ns";
|
||||
os << std::chrono::duration_cast<std::chrono::milliseconds>(t.GetTime()).count();
|
||||
os << "ms";
|
||||
return os;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user