[progress]update progress

This commit is contained in:
JianjunJiang 2021-08-06 11:54:25 +08:00
parent 2aaa8f6b89
commit 977c650f97
2 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ static char * ssize(char * buf, double size)
return buf;
}
void progress_start(struct progress_t * p, size_t total)
void progress_start(struct progress_t * p, uint64_t total)
{
if(p && (total > 0))
{
@ -43,7 +43,7 @@ void progress_start(struct progress_t * p, size_t total)
}
}
void progress_update(struct progress_t * p, size_t bytes)
void progress_update(struct progress_t * p, uint64_t bytes)
{
char buf1[32], buf2[32];

View File

@ -8,13 +8,13 @@ extern "C" {
#include <x.h>
struct progress_t {
size_t total;
size_t done;
uint64_t total;
uint64_t done;
double start;
};
void progress_start(struct progress_t * p, size_t total);
void progress_update(struct progress_t * p, size_t bytes);
void progress_start(struct progress_t * p, uint64_t total);
void progress_update(struct progress_t * p, uint64_t bytes);
void progress_stop(struct progress_t * p);
#ifdef __cplusplus