summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-05-11 20:28:22 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-05-11 20:28:22 +0200
commit599d91629e8d8df8fe63dd81d8a492ab293adac2 (patch)
tree061c215c583f9e6cf1b5f9c3123557a32943aee0 /lib/libalpm/sync.c
parent799238d0416549dd0d59b4efde30fe518d67e0d0 (diff)
downloadpacman-599d91629e8d8df8fe63dd81d8a492ab293adac2.tar.gz
pacman-599d91629e8d8df8fe63dd81d8a492ab293adac2.tar.xz
wip
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index ba72906d..11742257 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1211,6 +1211,9 @@ static int check_validity(alpm_handle_t *handle,
event.type = ALPM_EVENT_INTEGRITY_START;
EVENT(handle, &event);
+
+struct timeval tv1, tv2;
+gettimeofday(&tv1, NULL);
PROGRESS(handle, ALPM_PROGRESS_INTEGRITY_START, "", 0,
total, current);
@@ -1220,6 +1223,11 @@ static int check_validity(alpm_handle_t *handle,
total, current);
event.type = ALPM_EVENT_INTEGRITY_DONE;
EVENT(handle, &event);
+ gettimeofday(&tv2, NULL);
+
+printf ("Total time = %f seconds\n",
+ (double) (tv2.tv_usec - tv1.tv_usec) / 1000000 +
+ (double) (tv2.tv_sec - tv1.tv_sec));
if(errors) {
for(i = errors; i; i = i->next) {