wooo stuff yay

This commit is contained in:
kin fuyuki 2026-02-20 02:29:05 -03:00
commit d1bb9d8c67
No known key found for this signature in database
GPG key ID: 0E4E8E519FB71401
91 changed files with 17403 additions and 42 deletions

17
engine/src/program.cpp Normal file
View file

@ -0,0 +1,17 @@
#include "program.h"
long long calibrate() {
unsigned long long start = __rdtsc();
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 100000000L; // 0.1 seconds
nanosleep(&ts, NULL);
return (__rdtsc() - start) * 10;
}
const long long enginend::CPUCLOCK=calibrate();
void enginend::program::changescene(scene *scn) {
this->currentscene->exit();
delete this->currentscene;
this->currentscene = scn;
this->currentscene->boot();
}