Add TRACY_NO_EXIT macro.

This commit is contained in:
Bartosz Taudul 2017-10-18 20:01:12 +02:00
parent 51013dc0e6
commit 9c4316879c
2 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,9 @@ It should be noted that tracy needs to calibrate its internal timers at each run
Copy files from `tracy/client` and `tracy/common` to your project. Add `tracy/TracyClient.cpp` to source files list. That's all. Tracy is now integrated into your application.
In the default configuration tracy is disabled. To enable it, add a TRACY\_ENABLE define.
In the default configuration tracy is disabled. To enable it, add a `TRACY_ENABLE` define.
If you want to profile a short-lived application, add a `TRACY_NO_EXIT` define. In this configuration tracy will not exit until an incoming connection is made, even if the application has already finished.
#### Marking zones

View File

@ -184,7 +184,9 @@ void Profiler::Worker()
{
for(;;)
{
#ifndef TRACY_NO_EXIT
if( ShouldExit() ) return;
#endif
m_sock = listen.Accept();
if( m_sock ) break;
}