Skip to content

Commit 38fc45f

Browse files
committed
common_tool: correct comforter output
1 parent ef92d3b commit 38fc45f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common_tool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void Common_Tool::parse_fd(Format_Reader *reader, int fd, ssize_t fd_size)
145145
ssize_t buf_start = 0;
146146
size_t total_bytes_read = 0;
147147
const time_t start_time = time(NULL);
148-
time_t printed_duration = 1;
148+
uint32_t printed_duration = 1;
149149
while (true) {
150150
ssize_t bytes_read = read(fd, &buf[buf_start], sizeof(buf)-buf_start);
151151
if (bytes_read == -1) {
@@ -159,7 +159,7 @@ void Common_Tool::parse_fd(Format_Reader *reader, int fd, ssize_t fd_size)
159159
}
160160
total_bytes_read += bytes_read;
161161
if (fd_size != -1) {
162-
const uint32_t now = time(NULL);
162+
const time_t now = time(NULL);
163163
const uint32_t duration = now-start_time;
164164
const uint8_t percent = (100*total_bytes_read/fd_size);
165165
if (duration != 0 && duration != printed_duration) {

0 commit comments

Comments
 (0)