Mejorar la función de monitorHilo y eliminar comentario
Se pasa ahora puntero del objeto de CpuMon y se cambia lo ubicación de la función Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
parent
a3b6ea0cab
commit
c234419a0b
10
src/main.cpp
10
src/main.cpp
@ -45,8 +45,7 @@ void showMenu(vector<string> *menu_elems, const uint8_t *num_menu,
|
||||
vector<string> *mensaje, Config *config);
|
||||
void showMenu(vector<string> *menu_elems, const uint8_t *num_menu,
|
||||
Config *config);
|
||||
|
||||
void monitorHilo(CpuMon monitor) { monitor.iniciarCPU_MON(); }
|
||||
void monitorHilo(CpuMon *monitor);
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
txt::inicializarIdioma(setlocale(LC_ALL, ""));
|
||||
@ -83,16 +82,13 @@ void userInterface(const uint8_t *num_menu, vector<string> *mensaje,
|
||||
break;
|
||||
}
|
||||
case MENU_INICIAR_STRESS: {
|
||||
/*TODO
|
||||
*Lleva al menú principal
|
||||
*/
|
||||
CpuMon monitor =
|
||||
CpuMon(std::thread::hardware_concurrency(),
|
||||
newwin(ui::g_maxLines - (TITULO_PRINCIPAL.size() + 4),
|
||||
ui::g_maxCols / 2 - 1, TITULO_PRINCIPAL.size() + 4,
|
||||
ui::g_maxCols - ui::g_maxCols / 2 - 1));
|
||||
|
||||
std::thread monHilo(monitorHilo, monitor);
|
||||
std::thread monHilo(monitorHilo, &monitor);
|
||||
sleep(10);
|
||||
|
||||
monitor.setEnfuncionamiento(false);
|
||||
@ -297,3 +293,5 @@ void showMenu(vector<string> *menu_elems, const uint8_t *num_menu,
|
||||
attroff(COLOR_PAIR(MENU_PRINCIPAL));
|
||||
userInterface(&highlight, config);
|
||||
}
|
||||
|
||||
void monitorHilo(CpuMon *monitor) { monitor->iniciarCPU_MON(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user