Skip to content

Commit

Permalink
Debugging...
Browse files Browse the repository at this point in the history
  • Loading branch information
CasualYT31 committed Jul 14, 2021
1 parent 28564c3 commit 732476e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SystemProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ SOFTWARE.*/

#include "SystemProperties.hpp"
#include <fstream>
#include <iostream>

std::uint64_t sys::convert(const std::uint64_t bytes, const sys::unit unit) {
switch (unit) {
Expand All @@ -33,6 +34,8 @@ std::uint64_t sys::convert(const std::uint64_t bytes, const sys::unit unit) {
return bytes / 1024 / 1024;
case sys::unit::GB:
return bytes / 1024 / 1024 / 1024;
default:
return bytes;
}
}

Expand All @@ -46,6 +49,8 @@ std::string sys::notation(const sys::unit unit) {
return "MB";
case sys::unit::GB:
return "GB";
default:
return "";
}
}

Expand Down Expand Up @@ -197,6 +202,7 @@ std::string sys::storage::capacity(const sys::unit unit) {
std::string ret;
// skip first three lines, read fourth line
for (int x = 0; x < 4; x++) std::getline(ifs, ret);
std::cout << ret << std::endl;
std::uint64_t count = std::stoll(ret);
ifs.close();
remove(tempfile.c_str());
Expand Down

0 comments on commit 732476e

Please sign in to comment.