aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_fs_download_persistence.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-10-27 09:47:07 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-10-27 09:47:07 +0000
commit92ea81543438aebee77ceec02800da3e4da6a421 (patch)
tree5f5075ae7e9cc68881fd94f7f98795b755fbd374 /src/fs/test_fs_download_persistence.c
parent4d14bcd5d233c1aeef03b34ec9d4b875a5d7bd2b (diff)
downloadgnunet-92ea81543438aebee77ceec02800da3e4da6a421.tar.gz
gnunet-92ea81543438aebee77ceec02800da3e4da6a421.zip
Refactoring gnunet time
Diffstat (limited to 'src/fs/test_fs_download_persistence.c')
-rw-r--r--src/fs/test_fs_download_persistence.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c
index ffd66c52d..4560985c9 100644
--- a/src/fs/test_fs_download_persistence.c
+++ b/src/fs/test_fs_download_persistence.c
@@ -180,15 +180,15 @@ progress_cb (void *cls,
180 case GNUNET_FS_STATUS_PUBLISH_PROGRESS: 180 case GNUNET_FS_STATUS_PUBLISH_PROGRESS:
181#if VERBOSE 181#if VERBOSE
182 printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", 182 printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
183 (unsigned long long) event->value.publish.completed, 183 (unsigned long long) event->abs_value.publish.completed,
184 (unsigned long long) event->value.publish.size, 184 (unsigned long long) event->abs_value.publish.size,
185 event->value.publish.specifics.progress.depth, 185 event->abs_value.publish.specifics.progress.depth,
186 (unsigned long long) event->value.publish.specifics.progress.offset); 186 (unsigned long long) event->abs_value.publish.specifics.progress.offset);
187#endif 187#endif
188 break; 188 break;
189 case GNUNET_FS_STATUS_PUBLISH_COMPLETED: 189 case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
190 printf ("Publishing complete, %llu kbps.\n", 190 printf ("Publishing complete, %llu kbps.\n",
191 (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL)); 191 (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL));
192 fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst"); 192 fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
193 start = GNUNET_TIME_absolute_get (); 193 start = GNUNET_TIME_absolute_get ();
194 GNUNET_assert (download == NULL); 194 GNUNET_assert (download == NULL);
@@ -206,7 +206,7 @@ progress_cb (void *cls,
206 case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: 206 case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
207 consider_restart (event->status); 207 consider_restart (event->status);
208 printf ("Download complete, %llu kbps.\n", 208 printf ("Download complete, %llu kbps.\n",
209 (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL)); 209 (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL));
210 GNUNET_SCHEDULER_add_now (sched, 210 GNUNET_SCHEDULER_add_now (sched,
211 &abort_download_task, 211 &abort_download_task,
212 NULL); 212 NULL);
@@ -216,10 +216,10 @@ progress_cb (void *cls,
216 GNUNET_assert (download == event->value.download.dc); 216 GNUNET_assert (download == event->value.download.dc);
217#if VERBOSE 217#if VERBOSE
218 printf ("Download is progressing (%llu/%llu at level %u off %llu)...\n", 218 printf ("Download is progressing (%llu/%llu at level %u off %llu)...\n",
219 (unsigned long long) event->value.download.completed, 219 (unsigned long long) event->abs_value.download.completed,
220 (unsigned long long) event->value.download.size, 220 (unsigned long long) event->abs_value.download.size,
221 event->value.download.specifics.progress.depth, 221 event->abs_value.download.specifics.progress.depth,
222 (unsigned long long) event->value.download.specifics.progress.offset); 222 (unsigned long long) event->abs_value.download.specifics.progress.offset);
223#endif 223#endif
224 break; 224 break;
225 case GNUNET_FS_STATUS_PUBLISH_ERROR: 225 case GNUNET_FS_STATUS_PUBLISH_ERROR: