0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

sleep for 1 second

This commit is contained in:
Sergey Yagovtsev 2016-09-16 01:37:50 +03:00
parent 4b71a64363
commit f4676ced6f
3 changed files with 5 additions and 4 deletions

View File

@ -105,9 +105,10 @@ EasyMainWindow::EasyMainWindow() : Parent(), m_treeWidget(nullptr), m_graphicsVi
QToolBar *fileToolBar = addToolBar(tr("File"));
QAction *connectAct = new QAction(tr("&Connect"), this);
{ QIcon icon(":/WiFi"); if (!icon.isNull()) connectAct->setIcon(icon); }
SET_ICON(connectAct, ":/WiFi");
QAction *newAct = new QAction(tr("&Capture"), this);
SET_ICON(newAct, ":/Start");
fileToolBar->addAction(connectAct);
fileToolBar->addAction(newAct);

View File

@ -383,7 +383,7 @@ uint32_t ProfileManager::dumpBlocksToStream(profiler::OStream& _outputStream)
::profiler::setEnabled(false);
//TODO remove it
std::this_thread::sleep_for(std::chrono::milliseconds(100));
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
// This is to make sure that no new descriptors or new threads will be
// added until we finish sending data.
guard_lock_t lock1(m_storedSpin);

View File

@ -218,12 +218,12 @@ public:
do {
const int8_t* data = current->data;
uint16_t i = 0;
do {
while (i + 1 < N && *(uint16_t*)data != 0) {
const uint16_t size = sizeof(uint16_t) + *(uint16_t*)data;
_outputStream.write((const char*)data, size);
data = data + size;
i += size;
} while (i + 1 < N && *(uint16_t*)data != 0);
}
current = current->prev;
} while (current != nullptr);