From 9ae8b92ba549ab916c88e9004a95c1ed0cd16059 Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Wed, 19 Jan 2022 10:48:57 +0000 Subject: [PATCH] Added loop to click trader and hit self for perf testing --- bot.cpp | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/bot.cpp b/bot.cpp index 3e80bf5..0a25597 100644 --- a/bot.cpp +++ b/bot.cpp @@ -1,6 +1,23 @@ #include "strat.hpp" +#include <csignal> +#include <cstdlib> +#include <iostream> + +void signalHandler(int signum) +{ + strat::destroy(); + std::exit(0); +} + +void no(int signum) +{ + std::cout << "no." << std::endl; +} int main(void) { - + signal(SIGINT, signalHandler); + // signal(SIGTERM, no); + strat::initialise(); + strat::mainLoop(); } -- Gitblit v1.9.3