ELinks 0.18.0
|
#include "elinks.h"
#include "network/progress.h"
#include "util/error.h"
#include "util/memory.h"
#include "util/time.h"
Macros | |
#define | SPD_DISP_TIME ((milliseconds_T) 100) |
#define | CURRENT_SPD_AFTER ((milliseconds_T) 100) |
Functions | |
int | has_progress (struct progress *progress) |
struct progress * | init_progress (off_t start) |
void | done_progress (struct progress *progress) |
static void | progress_timeout (void *progress_voidptr) |
Timer callback for progress.timer. | |
void | update_progress (struct progress *progress, off_t loaded, off_t size, off_t pos) |
void | start_update_progress (struct progress *progress, void(*timer_func)(void *), void *timer_func_data) |
#define CURRENT_SPD_AFTER ((milliseconds_T) 100) |
#define SPD_DISP_TIME ((milliseconds_T) 100) |
void done_progress | ( | struct progress * | progress | ) |
int has_progress | ( | struct progress * | progress | ) |
struct progress * init_progress | ( | off_t | start | ) |
|
static |
Timer callback for progress.timer.
As explained in install_timer(), this function must erase the expired timer ID from all variables.
void start_update_progress | ( | struct progress * | progress, |
void(* | timer_func )(void *), | ||
void * | timer_func_data ) |
Unlike in install_timer(), timer_func need not erase the expired timer ID from progress->timer. update_progress() installs the timer with a wrapper function that takes care of erasing the timer ID.
void update_progress | ( | struct progress * | progress, |
off_t | loaded, | ||
off_t | size, | ||
off_t | pos ) |