}
exp = GNUNET_TIME_absolute_get ();
start = exp;
- exp.value += 5 * 60 * 1000;
+ exp.abs_value += 5 * 60 * 1000;
memset (&k, 0, sizeof (GNUNET_HashCode));
for (i = 0; i < ITERATIONS; i++)
{
fprintf (stderr, "\n");
fprintf (stdout, "Stored %u items in %llums\n",
ITERATIONS,
- (unsigned long long) GNUNET_TIME_absolute_get_duration(start).value);
+ (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value);
start = GNUNET_TIME_absolute_get ();
memset (&k, 0, sizeof (GNUNET_HashCode));
for (i = 0; i < ITERATIONS; i++)
fprintf (stderr, "\n");
fprintf (stdout, "Found %u/%u items in %llums (%u were deleted during storage processing)\n",
found, ITERATIONS,
- (unsigned long long) GNUNET_TIME_absolute_get_duration(start).value,
+ (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value,
ITERATIONS - found);
GNUNET_DATACACHE_destroy (h);
k_length = sizeof (GNUNET_HashCode);
v_length = size;
v_type = type;
- v_now = (unsigned long long) now.value;
- v_discard_time = (unsigned long long) discard_time.value;
+ v_now = (unsigned long long) now.abs_value;
+ v_discard_time = (unsigned long long) discard_time.abs_value;
if (GNUNET_OK ==
prepared_statement_run (plugin,
plugin->update_value,
rbind[0].buffer = &total;
rbind[0].is_unsigned = GNUNET_YES;
v_type = type;
- v_now = (unsigned long long) now.value;
+ v_now = (unsigned long long) now.abs_value;
if ((GNUNET_OK !=
(ret = prepared_statement_run_select (plugin,
plugin->count_value,
return GNUNET_SYSERR;
}
cnt++;
- expire.value = v_expire;
+ expire.abs_value = v_expire;
if (GNUNET_OK != iter (iter_cls,
expire,
key,
}
for (i=0;i<cnt;i++)
{
- expiration_time.value = GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, i, 0));
+ expiration_time.abs_value = GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, i, 0));
type = ntohl (*(uint32_t *) PQgetvalue (res, i, 1));
size = PQgetlength (res, i, 2);
#if DEBUG_POSTGRES
"PUT",
(unsigned int) size,
GNUNET_h2s (key),
- (unsigned long long) GNUNET_TIME_absolute_get_remaining (discard_time).value);
+ (unsigned long long) GNUNET_TIME_absolute_get_remaining (discard_time).rel_value);
#endif
- dval = (int64_t) discard_time.value;
+ dval = (int64_t) discard_time.abs_value;
if (dval < 0)
dval = INT64_MAX;
if (sq_prepare (plugin->dbh,
sqlite3_bind_blob (stmt, 1, key, sizeof (GNUNET_HashCode),
SQLITE_TRANSIENT);
sqlite3_bind_int (stmt, 2, type);
- ntime = (int64_t) now.value;
+ ntime = (int64_t) now.abs_value;
GNUNET_assert (ntime >= 0);
- sqlite3_bind_int64 (stmt, 3, now.value);
+ sqlite3_bind_int64 (stmt, 3, now.abs_value);
if (SQLITE_ROW != sqlite3_step (stmt))
{
LOG_SQLITE (plugin->dbh,
sqlite3_bind_blob (stmt, 1, key, sizeof (GNUNET_HashCode),
SQLITE_TRANSIENT);
sqlite3_bind_int (stmt, 2, type);
- sqlite3_bind_int64 (stmt, 3, now.value);
+ sqlite3_bind_int64 (stmt, 3, now.abs_value);
if (sqlite3_step (stmt) != SQLITE_ROW)
break;
size = sqlite3_column_bytes (stmt, 0);
dat = sqlite3_column_blob (stmt, 0);
- exp.value = sqlite3_column_int64 (stmt, 1);
- ntime = (int64_t) exp.value;
+ exp.abs_value = sqlite3_column_int64 (stmt, 1);
+ ntime = (int64_t) exp.abs_value;
if (ntime == INT64_MAX)
exp = GNUNET_TIME_UNIT_FOREVER_ABS;
cnt++;
return;
}
exp = GNUNET_TIME_absolute_get ();
- exp.value += 5 * 60 * 1000;
+ exp.abs_value += 5 * 60 * 1000;
memset (&k, 0, sizeof (GNUNET_HashCode));
for (i = 0; i < 100; i++)
{
return;
}
exp = GNUNET_TIME_absolute_get ();
- exp.value += 20 * 60 * 1000;
+ exp.abs_value += 20 * 60 * 1000;
memset (buf, 1, sizeof (buf));
memset (&k, 0, sizeof (GNUNET_HashCode));
for (i = 0; i < 10; i++)
GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
for (j = i; j < sizeof (buf); j += 10)
{
- exp.value++;
+ exp.abs_value++;
buf[j] = i;
ASSERT (GNUNET_OK ==
GNUNET_DATACACHE_put (h,