Emu: Singleton example

This commit is contained in:
Riyyi
2022-08-17 22:55:42 +02:00
parent 38c053e2d8
commit 539837ae4e
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
#include "processing-unit.h" #include "processing-unit.h"
#include "ruc/singleton.h" #include "ruc/singleton.h"
class Emu : ruc::Singleton<Emu> { class Emu final : public ruc::Singleton<Emu> {
public: public:
Emu(s) {} Emu(s) {}
+3
View File
@@ -1,5 +1,6 @@
#include <cstdio> #include <cstdio>
#include "emu.h"
#include "ruc/timer.h" #include "ruc/timer.h"
int main(int argc, char* argv[]) int main(int argc, char* argv[])
@@ -8,5 +9,7 @@ int main(int argc, char* argv[])
printf("%fms\n", t.elapsedNanoseconds() / 1000000.0); printf("%fms\n", t.elapsedNanoseconds() / 1000000.0);
Emu::the().ReadRAM(0, 0);
return 0; return 0;
} }