run_time);
rst = GNUNET_TIME_absolute_get_remaining (end_time);
restart_at = GNUNET_TIME_relative_min (rst, restart_at);
- if (rst.value > 0)
+ if (rst.rel_value > 0)
continue;
stop_job (qe);
}
struct GNUNET_TIME_Relative dur;
dur = GNUNET_TIME_absolute_get_duration (timestamp);
- return GNUNET_BIO_write_int64 (wh, dur.value);
+ return GNUNET_BIO_write_int64 (wh, dur.rel_value);
}
{
struct GNUNET_TIME_Relative dur;
if (GNUNET_OK !=
- GNUNET_BIO_read_int64 (rh, &dur.value))
+ GNUNET_BIO_read_int64 (rh, &dur.rel_value))
return GNUNET_SYSERR;
*timestamp = GNUNET_TIME_absolute_subtract (GNUNET_TIME_absolute_get (),
dur);
(GNUNET_YES !=
GNUNET_FS_uri_test_chk (ret->chk_uri)) ) ) ||
(GNUNET_OK !=
- GNUNET_BIO_read_int64 (rh, &ret->expirationTime.value)) ||
+ GNUNET_BIO_read_int64 (rh, &ret->expirationTime.abs_value)) ||
(GNUNET_OK !=
read_start_time (rh, &ret->start_time)) ||
(GNUNET_OK !=
(GNUNET_OK !=
GNUNET_BIO_write_string (wh, chks)) ||
(GNUNET_OK !=
- GNUNET_BIO_write_int64 (wh, fi->expirationTime.value)) ||
+ GNUNET_BIO_write_int64 (wh, fi->expirationTime.abs_value)) ||
(GNUNET_OK !=
write_start_time (wh, fi->start_time)) ||
(GNUNET_OK !=
const void *data,
size_t size)
{
- if (GNUNET_TIME_absolute_get_duration (expiration).value > 0)
+ if (GNUNET_TIME_absolute_get_duration (expiration).rel_value > 0)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Result received has already expired.\n");
}
ass.purpose.size = htonl(sizeof(struct LocUriAssembly));
ass.purpose.purpose = htonl(GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT);
- et.value = exptime;
+ et.abs_value = exptime;
ass.exptime = GNUNET_TIME_absolute_hton (et);
if (GNUNET_OK !=
GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT,
(unsigned long long) GNUNET_ntohll (uri->data.loc.fi.file_length),
peerId,
peerSig,
- (unsigned long long) uri->data.loc.expirationTime.value);
+ (unsigned long long) uri->data.loc.expirationTime.abs_value);
GNUNET_free (peerSig);
GNUNET_free (peerId);
return ret;
if (verbose)
{
s = GNUNET_STRINGS_relative_time_to_string(info->value.download.eta);
- t = GNUNET_STRINGS_byte_size_fancy(info->value.download.completed * 1000LL / (info->value.download.duration.value + 1));
+ t = GNUNET_STRINGS_byte_size_fancy(info->value.download.completed * 1000LL / (info->value.download.duration.rel_value + 1));
fprintf (stdout,
_("Downloading `%s' at %llu/%llu (%s remaining, %s/s)\n"),
info->value.download.filename,
GNUNET_SCHEDULER_shutdown (sched);
break;
case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
- s = GNUNET_STRINGS_byte_size_fancy(info->value.download.completed * 1000 / (info->value.download.duration.value + 1));
+ s = GNUNET_STRINGS_byte_size_fancy(info->value.download.completed * 1000 / (info->value.download.duration.rel_value + 1));
fprintf (stdout,
_("Downloading `%s' done (%s/s).\n"),
info->value.download.filename,
delay = GNUNET_TIME_absolute_get_duration (start);
GNUNET_LOAD_update (datastore_get_load,
- delay.value);
+ delay.rel_value);
}
unsigned int repl;
/* consider 'cp' as a migration target for mb */
- if (GNUNET_TIME_absolute_get_remaining (cp->migration_blocked).value > 0)
+ if (GNUNET_TIME_absolute_get_remaining (cp->migration_blocked).rel_value > 0)
return GNUNET_YES; /* peer has requested no migration! */
if (mb != NULL)
{
pr))
{
GNUNET_LOAD_update (rt_entry_lifetime,
- GNUNET_TIME_absolute_get_duration (pr->start_time).value);
+ GNUNET_TIME_absolute_get_duration (pr->start_time).rel_value);
}
if (pr->qe != NULL)
{
return 0;
}
GNUNET_LOAD_update (cp->transmission_delay,
- GNUNET_TIME_absolute_get_duration (cp->last_transmission_request_start).value);
+ GNUNET_TIME_absolute_get_duration (cp->last_transmission_request_start).rel_value);
now = GNUNET_TIME_absolute_get ();
msize = 0;
min_delay = GNUNET_TIME_UNIT_FOREVER_REL;
(pm->msize <= size) )
{
next_pm = pm->next;
- if (pm->delay_until.value > now.value)
+ if (pm->delay_until.abs_value > now.abs_value)
{
min_delay = GNUNET_TIME_relative_min (min_delay,
GNUNET_TIME_absolute_get_remaining (pm->delay_until));
#endif
/* 2b) many other requests to this peer */
delay = GNUNET_TIME_absolute_get_duration (cp->last_request_times[cp->last_request_times_off % MAX_QUEUE_PER_PEER]);
- if (delay.value <= cp->avg_delay.value)
+ if (delay.rel_value <= cp->avg_delay.rel_value)
{
#if DEBUG_FS
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"NOT sending query since we send %u others to this peer in the last %llums\n",
MAX_QUEUE_PER_PEER,
- cp->avg_delay.value);
+ cp->avg_delay.abs_value);
#endif
return GNUNET_YES; /* skip */
}
score += 1.0; /* likely successful based on hot path */
}
/* 3b) include latency */
- if (cp->avg_delay.value < 4 * TTL_DECREMENT)
+ if (cp->avg_delay.rel_value < 4 * TTL_DECREMENT)
score += 1.0; /* likely fast based on latency */
/* 3c) include priorities */
if (cp->avg_priority <= pr->remaining_priority / 2.0)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"No peer selected for forwarding of query `%s', will try again in %llu ms!\n",
GNUNET_h2s (&pr->query),
- delay.value);
+ delay.abs_value);
#endif
pr->task = GNUNET_SCHEDULER_add_delayed (sched,
delay,
if (i < pr->used_targets_off)
{
cur_delay = GNUNET_TIME_absolute_get_duration (pr->used_targets[i].last_request_time);
- prq->sender->avg_delay.value
- = (prq->sender->avg_delay.value *
- (RUNAVG_DELAY_N - 1) + cur_delay.value) / RUNAVG_DELAY_N;
+ prq->sender->avg_delay.rel_value
+ = (prq->sender->avg_delay.rel_value *
+ (RUNAVG_DELAY_N - 1) + cur_delay.rel_value) / RUNAVG_DELAY_N;
prq->sender->avg_priority
= (prq->sender->avg_priority *
(RUNAVG_DELAY_N - 1) + pr->priority) / (double) RUNAVG_DELAY_N;
key,
pr));
GNUNET_LOAD_update (rt_entry_lifetime,
- GNUNET_TIME_absolute_get_duration (pr->start_time).value);
+ GNUNET_TIME_absolute_get_duration (pr->start_time).rel_value);
break;
case GNUNET_BLOCK_EVALUATION_OK_DUPLICATE:
GNUNET_STATISTICS_update (stats,
= GNUNET_TIME_relative_to_absolute (art_delay);
GNUNET_STATISTICS_update (stats,
gettext_noop ("cummulative artificial delay introduced (ms)"),
- art_delay.value,
+ art_delay.abs_value,
GNUNET_NO);
#endif
reply->msize = msize;
delay = GNUNET_TIME_absolute_get_duration (*start);
GNUNET_free (start);
GNUNET_LOAD_update (datastore_put_load,
- delay.value);
+ delay.rel_value);
if (GNUNET_OK == success)
return;
GNUNET_STATISTICS_update (stats,
{
cp = GNUNET_CONTAINER_multihashmap_get (connected_peers,
&other->hashPubKey);
- if (GNUNET_TIME_absolute_get_duration (cp->last_migration_block).value < 5000)
+ if (GNUNET_TIME_absolute_get_duration (cp->last_migration_block).rel_value < 5000)
return GNUNET_OK; /* already blocked */
/* We're too busy; send MigrationStop message! */
if (GNUNET_YES != active_migration)
}
if ( (GNUNET_LOAD_get_load (cp->transmission_delay) > 3 * (1 + priority)) ||
(GNUNET_LOAD_get_average (cp->transmission_delay) >
- GNUNET_CONSTANTS_MAX_CORK_DELAY.value * 2 + GNUNET_LOAD_get_average (rt_entry_lifetime)) )
+ GNUNET_CONSTANTS_MAX_CORK_DELAY.rel_value * 2 + GNUNET_LOAD_get_average (rt_entry_lifetime)) )
{
/* don't have BW to send to peer, or would likely take longer than we have for it,
so at best indirect the query */
&cdc);
if (cdc.have != NULL)
{
- if (cdc.have->start_time.value + cdc.have->ttl >=
- pr->start_time.value + pr->ttl)
+ if (cdc.have->start_time.abs_value + cdc.have->ttl >=
+ pr->start_time.abs_value + pr->ttl)
{
/* existing request has higher TTL, drop new one! */
cdc.have->priority += pr->priority;
pr->hnode = GNUNET_CONTAINER_heap_insert (requests_by_expiration_heap,
pr,
- pr->start_time.value + pr->ttl);
+ pr->start_time.abs_value + pr->ttl);
GNUNET_STATISTICS_update (stats,
gettext_noop ("# P2P searches received"),
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE))
{
del = GNUNET_TIME_absolute_get_duration (start_time);
- if (del.value == 0)
- del.value = 1;
- fancy = GNUNET_STRINGS_byte_size_fancy (((unsigned long long)FILESIZE) * 1000LL / del.value);
+ if (del.rel_value == 0)
+ del.rel_value = 1;
+ fancy = GNUNET_STRINGS_byte_size_fancy (((unsigned long long)FILESIZE) * 1000LL / del.rel_value);
fprintf (stdout,
"Download speed was %s/s\n",
fancy);
case GNUNET_FS_STATUS_PUBLISH_PROGRESS:
#if VERBOSE
printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.publish.completed,
- (unsigned long long) event->value.publish.size,
- event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.offset);
+ (unsigned long long) event->abs_value.publish.completed,
+ (unsigned long long) event->abs_value.publish.size,
+ event->abs_value.publish.specifics.progress.depth,
+ (unsigned long long) event->abs_value.publish.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL));
+ (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL));
fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
start = GNUNET_TIME_absolute_get ();
download = GNUNET_FS_download_start (fs,
break;
case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
printf ("Download complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL));
+ (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL));
GNUNET_SCHEDULER_add_now (sched,
&abort_download_task,
NULL);
GNUNET_assert (download == event->value.download.dc);
#if VERBOSE
printf ("Download is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.download.completed,
- (unsigned long long) event->value.download.size,
- event->value.download.specifics.progress.depth,
- (unsigned long long) event->value.download.specifics.progress.offset);
+ (unsigned long long) event->abs_value.download.completed,
+ (unsigned long long) event->abs_value.download.size,
+ event->abs_value.download.specifics.progress.depth,
+ (unsigned long long) event->abs_value.download.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
case GNUNET_FS_STATUS_PUBLISH_PROGRESS:
#if VERBOSE
printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.publish.completed,
- (unsigned long long) event->value.publish.size,
- event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.offset);
+ (unsigned long long) event->abs_value.publish.completed,
+ (unsigned long long) event->abs_value.publish.size,
+ event->abs_value.publish.specifics.progress.depth,
+ (unsigned long long) event->abs_value.publish.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL));
+ (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL));
fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
start = GNUNET_TIME_absolute_get ();
download = GNUNET_FS_download_start (fs,
break;
case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
printf ("Download complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL));
+ (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL));
GNUNET_SCHEDULER_add_now (sched,
&abort_download_task,
NULL);
GNUNET_assert (download == event->value.download.dc);
#if VERBOSE
printf ("Download is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.download.completed,
- (unsigned long long) event->value.download.size,
- event->value.download.specifics.progress.depth,
- (unsigned long long) event->value.download.specifics.progress.offset);
+ (unsigned long long) event->abs_value.download.completed,
+ (unsigned long long) event->abs_value.download.size,
+ event->abs_value.download.specifics.progress.depth,
+ (unsigned long long) event->abs_value.download.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
case GNUNET_FS_STATUS_PUBLISH_PROGRESS:
#if VERBOSE
printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.publish.completed,
- (unsigned long long) event->value.publish.size,
- event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.offset);
+ (unsigned long long) event->abs_value.publish.completed,
+ (unsigned long long) event->abs_value.publish.size,
+ event->abs_value.publish.specifics.progress.depth,
+ (unsigned long long) event->abs_value.publish.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL));
+ (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL));
fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
start = GNUNET_TIME_absolute_get ();
GNUNET_assert (download == NULL);
case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
consider_restart (event->status);
printf ("Download complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL));
+ (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL));
GNUNET_SCHEDULER_add_now (sched,
&abort_download_task,
NULL);
GNUNET_assert (download == event->value.download.dc);
#if VERBOSE
printf ("Download is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.download.completed,
- (unsigned long long) event->value.download.size,
- event->value.download.specifics.progress.depth,
- (unsigned long long) event->value.download.specifics.progress.offset);
+ (unsigned long long) event->abs_value.download.completed,
+ (unsigned long long) event->abs_value.download.size,
+ event->abs_value.download.specifics.progress.depth,
+ (unsigned long long) event->abs_value.download.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
ret = event->value.publish.cctx;
printf ("Publish complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
+ (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024));
if (0 == strcmp ("list_indexed-context-dir",
event->value.publish.cctx))
GNUNET_SCHEDULER_add_continuation (sched,
GNUNET_assert (publish == event->value.publish.pc);
#if VERBOSE
printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.publish.completed,
- (unsigned long long) event->value.publish.size,
- event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.offset);
+ (unsigned long long) event->abs_value.publish.completed,
+ (unsigned long long) event->abs_value.publish.size,
+ event->abs_value.publish.specifics.progress.depth,
+ (unsigned long long) event->abs_value.publish.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
ret = event->value.publish.cctx;
printf ("Publish complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
+ (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024));
if (0 == strcmp ("publish-context-dir",
event->value.publish.cctx))
GNUNET_SCHEDULER_add_continuation (sched,
GNUNET_assert (publish == event->value.publish.pc);
#if VERBOSE
printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.publish.completed,
- (unsigned long long) event->value.publish.size,
- event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.offset);
+ (unsigned long long) event->abs_value.publish.completed,
+ (unsigned long long) event->abs_value.publish.size,
+ event->abs_value.publish.specifics.progress.depth,
+ (unsigned long long) event->abs_value.publish.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
consider_restart (event->status);
ret = event->value.publish.cctx;
printf ("Publish complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
+ (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024));
if (0 == strcmp ("publish-context-dir",
event->value.publish.cctx))
GNUNET_SCHEDULER_add_continuation (sched,
GNUNET_assert (publish == event->value.publish.pc);
#if VERBOSE
printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.publish.completed,
- (unsigned long long) event->value.publish.size,
- event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.offset);
+ (unsigned long long) event->abs_value.publish.completed,
+ (unsigned long long) event->abs_value.publish.size,
+ event->abs_value.publish.specifics.progress.depth,
+ (unsigned long long) event->abs_value.publish.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_SUSPEND:
case GNUNET_FS_STATUS_PUBLISH_PROGRESS:
#if VERBOSE
printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.publish.completed,
- (unsigned long long) event->value.publish.size,
- event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.offset);
+ (unsigned long long) event->abs_value.publish.completed,
+ (unsigned long long) event->abs_value.publish.size,
+ event->abs_value.publish.specifics.progress.depth,
+ (unsigned long long) event->abs_value.publish.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
case GNUNET_FS_STATUS_PUBLISH_PROGRESS:
#if VERBOSE
printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.publish.completed,
- (unsigned long long) event->value.publish.size,
- event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.offset);
+ (unsigned long long) event->abs_value.publish.completed,
+ (unsigned long long) event->abs_value.publish.size,
+ event->abs_value.publish.specifics.progress.depth,
+ (unsigned long long) event->abs_value.publish.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
case GNUNET_FS_STATUS_PUBLISH_PROGRESS:
#if VERBOSE
printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.publish.completed,
- (unsigned long long) event->value.publish.size,
- event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.offset);
+ (unsigned long long) event->abs_value.publish.completed,
+ (unsigned long long) event->abs_value.publish.size,
+ event->abs_value.publish.specifics.progress.depth,
+ (unsigned long long) event->abs_value.publish.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
+ (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024));
start = GNUNET_TIME_absolute_get ();
unindex = GNUNET_FS_unindex_start (fs,
fn,
break;
case GNUNET_FS_STATUS_UNINDEX_COMPLETED:
printf ("Unindex complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
+ (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024));
GNUNET_SCHEDULER_add_continuation (sched,
&abort_unindex_task,
NULL,
GNUNET_assert (unindex == event->value.unindex.uc);
#if VERBOSE
printf ("Unindex is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.unindex.completed,
- (unsigned long long) event->value.unindex.size,
- event->value.unindex.specifics.progress.depth,
- (unsigned long long) event->value.unindex.specifics.progress.offset);
+ (unsigned long long) event->abs_value.unindex.completed,
+ (unsigned long long) event->abs_value.unindex.size,
+ event->abs_value.unindex.specifics.progress.depth,
+ (unsigned long long) event->abs_value.unindex.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
case GNUNET_FS_STATUS_PUBLISH_PROGRESS:
#if VERBOSE
printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.publish.completed,
- (unsigned long long) event->value.publish.size,
- event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.offset);
+ (unsigned long long) event->abs_value.publish.completed,
+ (unsigned long long) event->abs_value.publish.size,
+ event->abs_value.publish.specifics.progress.depth,
+ (unsigned long long) event->abs_value.publish.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
+ (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024));
start = GNUNET_TIME_absolute_get ();
unindex = GNUNET_FS_unindex_start (fs,
fn,
break;
case GNUNET_FS_STATUS_UNINDEX_COMPLETED:
printf ("Unindex complete, %llu kbps.\n",
- (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
+ (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024));
GNUNET_SCHEDULER_add_continuation (sched,
&abort_unindex_task,
NULL,
GNUNET_assert (unindex == event->value.unindex.uc);
#if VERBOSE
printf ("Unindex is progressing (%llu/%llu at level %u off %llu)...\n",
- (unsigned long long) event->value.unindex.completed,
- (unsigned long long) event->value.unindex.size,
- event->value.unindex.specifics.progress.depth,
- (unsigned long long) event->value.unindex.specifics.progress.offset);
+ (unsigned long long) event->abs_value.unindex.completed,
+ (unsigned long long) event->abs_value.unindex.size,
+ event->abs_value.unindex.specifics.progress.depth,
+ (unsigned long long) event->abs_value.unindex.specifics.progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_SUSPEND:
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE))
{
del = GNUNET_TIME_absolute_get_duration (start_time);
- if (del.value == 0)
- del.value = 1;
- fancy = GNUNET_STRINGS_byte_size_fancy (((unsigned long long)FILESIZE) * 1000LL / del.value);
+ if (del.rel_value == 0)
+ del.rel_value = 1;
+ fancy = GNUNET_STRINGS_byte_size_fancy (((unsigned long long)FILESIZE) * 1000LL / del.rel_value);
fprintf (stdout,
"Download speed was %s/s\n",
fancy);
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE))
{
del = GNUNET_TIME_absolute_get_duration (start_time);
- if (del.value == 0)
- del.value = 1;
- fancy = GNUNET_STRINGS_byte_size_fancy (((unsigned long long)FILESIZE) * 1000LL / del.value);
+ if (del.rel_value == 0)
+ del.rel_value = 1;
+ fancy = GNUNET_STRINGS_byte_size_fancy (((unsigned long long)FILESIZE) * 1000LL / del.rel_value);
fprintf (stdout,
"Download speed was %s/s\n",
fancy);