initialize time-step statistics in a world; rename profile function

This commit is contained in:
Irlan
2018-04-26 23:51:20 -03:00
parent 16d351ecac
commit cd6c7e188a
5 changed files with 47 additions and 40 deletions

View File

@ -143,28 +143,25 @@ void b3Free(void* block);
// from this software.
void b3Log(const char* string, ...);
// You should implement this function to use your own profiler.
bool b3PushProfileScope(const char* name);
// You should implement this function to listen when a profile scope is opened.
void b3BeginProfileScope(const char* name);
// You should implement this function to use your own profiler.
void b3PopProfileScope();
// You must implement this function if you have implemented b3BeginProfileScope.
// Implement this function to listen when a profile scope is closed.
void b3EndProfileScope();
//
struct b3ProfileScope
{
b3ProfileScope(const char* name)
{
b = b3PushProfileScope(name);
b3BeginProfileScope(name);
}
~b3ProfileScope()
{
if (b)
{
b3PopProfileScope();
}
b3EndProfileScope();
}
private:
bool b;
};
// The current version this software.