summaryrefslogtreecommitdiffstats
path: root/src/pacman/downloadprog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/downloadprog.c')
-rw-r--r--src/pacman/downloadprog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/downloadprog.c b/src/pacman/downloadprog.c
index ae9f2005..e7dc37f0 100644
--- a/src/pacman/downloadprog.c
+++ b/src/pacman/downloadprog.c
@@ -53,6 +53,9 @@ void log_progress(const char *filename, int xfered, int total)
{
static unsigned int lasthash = 0, mouth = 0;
unsigned int i, hash;
+ /* a little hard to conceal easter eggs in open-source software,
+ * but they're still fun. ;) */
+ const unsigned short chomp = alpm_option_get_chomp();
unsigned int chomp = 0;
char *fname, *p;
unsigned int maxcols = getcols();
@@ -75,9 +78,6 @@ void log_progress(const char *filename, int xfered, int total)
return;
}
- /* a little hard to conceal easter eggs in open-source software, but they're still fun. ;) */
- chomp = alpm_option_get_chomp();
-
gettimeofday(&current_time, NULL);
total_timediff = current_time.tv_sec-initial_time.tv_sec
+ (float)(current_time.tv_usec-initial_time.tv_usec) / 1000000;