From 95c92335fb793fec124a2de716290994dcaa3fd7 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期五, 23 四月 2021 17:09:33 +0800
Subject: [PATCH] update bhome_msg_api.pb.go

---
 box/status_main.cc |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/box/status_main.cc b/box/status_main.cc
index 993fbee..3a0288b 100644
--- a/box/status_main.cc
+++ b/box/status_main.cc
@@ -41,7 +41,7 @@
 	auto showStatus = [&]() {
 		auto next = Now();
 		const uint64_t start = ToMs(next);
-		auto last = 0;
+		auto last = 0ul;
 		while (run) {
 			std::this_thread::sleep_until(next);
 			auto passed = ToMs(next) - start;
@@ -62,19 +62,19 @@
 				int nkb = left / Kb;
 				int nb = left - nkb * Kb;
 				char buf[64] = {0};
-				int n = sprintf(buf, " %4dMb %4dKb %4dB", nmb, nkb, nb);
-				int start = (nmb > 0) ? 0 : ((nkb > 0) ? 7 : 14);
+				int n = sprintf(buf, " %4dM%4dK%4dB", nmb, nkb, nb);
+				int start = (nmb > 0) ? 0 : ((nkb > 0) ? 5 : 10);
 				buf[start] = sign;
 				return std::string(buf + start);
 			};
 
 			char buf[200] = "\n";
 			auto Print = [&](bool new_line) {
-				int n = sprintf(buf, "\r%6ds avail : %12ld = %s %6ds", sec, cur, Pretty(cur).c_str() + 1, sec);
+				int n = sprintf(buf, "\r%6lds avail : %12ld = %s %6lds", sec, cur, Pretty(cur).c_str() + 1, sec);
 				printf("%s", buf);
 				if (new_line) {
 					auto diff = cur - last;
-					printf(" (%+ld = %s)\n", diff, Pretty(diff).c_str());
+					printf(" (%+6ld = %s)\n", diff, Pretty(diff).c_str());
 					printf("%s", buf);
 				}
 				fflush(stdout);

--
Gitblit v1.8.0