mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
added benchmark util
This commit is contained in:
parent
7a99d90337
commit
8b25d37a37
1 changed files with 11 additions and 0 deletions
11
src/util/benchmark.hpp
Normal file
11
src/util/benchmark.hpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDebug>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
#define BENCH(x) \
|
||||
QElapsedTimer x; \
|
||||
x.start();
|
||||
|
||||
#define MARK(x) \
|
||||
qDebug() << __FILE__ << __LINE__ << static_cast<float>(x.nsecsElapsed()) / 100000.0 << "ms";
|
Loading…
Reference in a new issue