feat: time tracking added

This commit is contained in:
2025-11-19 08:53:36 +01:00
parent 7944026fd3
commit 7c55eb3be4

View File

@@ -7,6 +7,7 @@
#include <QImage>
#include <QLabel>
#include <QPixmap>
#include <chrono>
#include <functional>
#include <math.h>
#include <stdio.h>
@@ -77,7 +78,17 @@ int main(int argc, char *argv[]) {
polygon poly =
polygon(vec3(0.9, 0.9, 1.0), vec3(0.5, 0.1, 1.0), vec3(0.1, 0.9, 1.0));
std::chrono::steady_clock::time_point begin =
std::chrono::steady_clock::now();
renderer.render(&testModel);
std::chrono::steady_clock::time_point end =
std::chrono::steady_clock::now();
std::cout << "Time difference = "
<< std::chrono::duration_cast<std::chrono::milliseconds>(end -
begin)
.count()
<< "[ms]" << std::endl;
QApplication a(argc, argv);
uint8_t *pixel = new uint8_t[64 * 64 * 3];