blob: 720060d8bcfeb004992b3229bdf443ac42a02476 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef __PROGRESS_H
#define __PROGRESS_H
#include <sys/types.h>
struct progress {
unsigned int last_size;
unsigned int last_update_sec;
unsigned int last_change_sec;
unsigned int start_sec;
char *curfile;
};
void progress_init(struct progress *p, const char *curfile);
void progress_update(struct progress *p, off_t beg_size,
off_t transferred, off_t totalsize);
static inline void
progress_free(struct progress *p)
{
free(p->curfile);
}
#endif
|