33 lines
619 B
C++
33 lines
619 B
C++
#ifndef SYS_HPP
|
|
#define SYS_HPP
|
|
|
|
#include <sys/statvfs.h>
|
|
|
|
#include <array>
|
|
#include <ctime>
|
|
#include <string>
|
|
#include <utils.hpp>
|
|
|
|
namespace sys {
|
|
|
|
const char months[][4] = {"sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "paz", "lis", "gru"};
|
|
const char wdays[][4] = {"Nie", "Pon", "Wto", "Sro", "Czw", "Pia", "Sob"};
|
|
|
|
struct Memory {
|
|
uint64_t free = 0;
|
|
uint64_t used = 0;
|
|
uint64_t total = 0;
|
|
};
|
|
|
|
struct TimeDate {
|
|
char time[9];
|
|
char date[13];
|
|
};
|
|
|
|
void getTimeDate(TimeDate* td);
|
|
void getDisk(Memory* disk, std::string mount);
|
|
void getRam(Memory* mem);
|
|
|
|
} // namespace sys
|
|
|
|
#endif |