Line | |
---|
1 | |
---|
2 | #include "BBCTimer.h" |
---|
3 | |
---|
4 | namespace BBC {
|
---|
5 |
|
---|
6 | void Timer::start()
|
---|
7 | {
|
---|
8 | time(&mTimer);
|
---|
9 | mInitTime = localtime(&mTimer);
|
---|
10 | }
|
---|
11 |
|
---|
12 | void Timer::stop()
|
---|
13 | {
|
---|
14 | time(&mTimer);
|
---|
15 | mEndTime= localtime(&mTimer);
|
---|
16 | }
|
---|
17 |
|
---|
18 | void Timer::printStartTime()
|
---|
19 | {
|
---|
20 | Ogre::LogManager::getSingleton().logMessage("Init " + Ogre::StringConverter::toString(mInitTime->tm_hour) + ":" + Ogre::StringConverter::toString(mInitTime->tm_min) + ":" + Ogre::StringConverter::toString(mInitTime->tm_sec));
|
---|
21 | }
|
---|
22 |
|
---|
23 | void Timer::printStopTime()
|
---|
24 | {
|
---|
25 | Ogre::LogManager::getSingleton().logMessage("End " + Ogre::StringConverter::toString(mEndTime->tm_hour) + ":" + Ogre::StringConverter::toString(mEndTime->tm_min) + ":" + Ogre::StringConverter::toString(mEndTime->tm_sec));
|
---|
26 | }
|
---|
27 |
|
---|
28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.