Browse Source

Emu: Singleton example

master
Riyyi 2 years ago
parent
commit
539837ae4e
  1. 2
      src/emu.h
  2. 3
      src/main.cpp

2
src/emu.h

@ -6,7 +6,7 @@
#include "processing-unit.h"
#include "ruc/singleton.h"
class Emu : ruc::Singleton<Emu> {
class Emu final : public ruc::Singleton<Emu> {
public:
Emu(s) {}

3
src/main.cpp

@ -1,5 +1,6 @@
#include <cstdio>
#include "emu.h"
#include "ruc/timer.h"
int main(int argc, char* argv[])
@ -8,5 +9,7 @@ int main(int argc, char* argv[])
printf("%fms\n", t.elapsedNanoseconds() / 1000000.0);
Emu::the().ReadRAM(0, 0);
return 0;
}

Loading…
Cancel
Save