remove global

This commit is contained in:
aozhiwei 2020-07-04 18:38:45 +08:00
parent 154536a37d
commit f8d0ec025e
5 changed files with 2 additions and 19 deletions

View File

@ -126,7 +126,7 @@ int App::Run()
int delta_time = 0; int delta_time = 0;
while (!terminated) { while (!terminated) {
a8::tick_t begin_tick = a8::XGetTickCount(); a8::tick_t begin_tick = a8::XGetTickCount();
Global::g_nowtime = time(nullptr); nowtime = time(nullptr);
QuickExecute(delta_time); QuickExecute(delta_time);
SlowerExecute(delta_time); SlowerExecute(delta_time);
Schedule(); Schedule();

View File

@ -55,6 +55,7 @@ public:
char** argv = nullptr; char** argv = nullptr;
volatile bool terminated = false; volatile bool terminated = false;
a8::uuid::SnowFlake uuid; a8::uuid::SnowFlake uuid;
time_t nowtime = 0;
public: public:
int instance_id = 0; int instance_id = 0;

View File

@ -1,4 +0,0 @@
#include "precompile.h"
#include "global.h"
int Global::g_nowtime = time(nullptr);

View File

@ -1,13 +0,0 @@
#pragma once
extern int g_hint_flags;
class Global : public a8::Singleton<Global>
{
private:
Global() {};
friend class a8::Singleton<Global>;
public:
static int g_nowtime;
};

View File

@ -5,7 +5,6 @@
#include "constant.h" #include "constant.h"
#include "types.h" #include "types.h"
#include "global.h"
namespace google namespace google
{ {