Add Cpu class.
This commit is contained in:
parent
1cf5ad5212
commit
0556fd664c
8 changed files with 119 additions and 210 deletions
20
src/App.cpp
20
src/App.cpp
|
@ -27,26 +27,19 @@
|
|||
|
||||
#include "App.h"
|
||||
#include "Console.h"
|
||||
#include "Cpu.h"
|
||||
#include "net/Client.h"
|
||||
#include "net/Network.h"
|
||||
#include "Options.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
Client *client;
|
||||
uv_timer_t timer_req;
|
||||
|
||||
|
||||
void timer_cb(uv_timer_t* handle) {
|
||||
LOG_DEBUG("TIMER");
|
||||
|
||||
client->disconnect();
|
||||
}
|
||||
|
||||
|
||||
App::App(int argc, char **argv)
|
||||
{
|
||||
Console::init();
|
||||
Cpu::init();
|
||||
|
||||
m_options = Options::parse(argc, argv);
|
||||
m_network = new Network(m_options);
|
||||
}
|
||||
|
@ -69,13 +62,6 @@ App::exec()
|
|||
|
||||
m_network->connect();
|
||||
|
||||
// uv_timer_init(uv_default_loop(), &timer_req);
|
||||
// uv_timer_start(&timer_req, timer_cb, 5000, 5000);
|
||||
|
||||
|
||||
// client = new Client();
|
||||
// client->connect("192.168.2.34", 3333);
|
||||
|
||||
const int r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
||||
uv_loop_close(uv_default_loop());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue