prosperon/source/engine/debug/debug.c

28 lines
380 B
C
Raw Normal View History

2021-11-30 21:29:18 -06:00
#include "debug.h"
#include "stb_ds.h"
#include "log.h"
#include "sokol/sokol_time.h"
2021-11-30 21:29:18 -06:00
unsigned long long triCount = 0;
void prof_start(struct d_prof *prof)
{
#ifndef NDEBUG
prof->lap = stm_now();
#endif
}
void prof(struct d_prof *prof)
{
#ifndef NDEBUG
uint64_t t = stm_since(prof->lap);
arrput(prof->ms, stm_sec(t));
#endif
}
2021-11-30 21:29:18 -06:00
void resetTriangles()
{
triCount = 0;
2022-02-06 10:14:57 -06:00
}