diff options
Diffstat (limited to 'UI.cpp')
-rw-r--r-- | UI.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1,15 +1,30 @@ #include "UI.h" +#include "cpuload.h" + +#include <algorithm> #include <iostream> +#include <string> + +#include <fmt/format.h> void UI::draw() { + std::vector<int> cpuloads = get_cpu_loads(); + std::cout << std::endl; std::cout << "- -- BPM +" << std::endl; std::cout << "Mode: Click __/__ (Clock Internal)" << std::endl; std::cout << "Status:" << std::endl; std::cout << " Alive/not alive" << std::endl; - std::cout << " CPU: --% --% ..." << std::endl; + + std::cout << " CPU:"; + for (auto& i: cpuloads) { + std::cout << fmt::format(" {:2}%", i); + } + int max = *std::max_element(cpuloads.begin(), cpuloads.end()); + std::cout << fmt::format(", max. {:2}%", max) << std::endl; + std::cout << " Notes/Channels: -- -- -- ... (Choose)" << std::endl; std::cout << " Timestamp: ------" << std::endl; std::cout << " Active sensing: ---" << std::endl; |