[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3194 - in GNUnet/src: applications/advertising application
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3194 - in GNUnet/src: applications/advertising applications/bootstrap_http applications/datastore applications/dht/module applications/fs/ecrs applications/fs/fsui applications/fs/module applications/fs/tools applications/gap applications/rpc applications/tbench applications/testbed applications/traffic transports util/os util/threads |
Date: |
Sun, 30 Jul 2006 20:37:28 -0700 (PDT) |
Author: grothoff
Date: 2006-07-30 20:37:23 -0700 (Sun, 30 Jul 2006)
New Revision: 3194
Modified:
GNUnet/src/applications/advertising/advertising.c
GNUnet/src/applications/bootstrap_http/http.c
GNUnet/src/applications/datastore/datastore.c
GNUnet/src/applications/dht/module/datastore_dht_master.c
GNUnet/src/applications/dht/module/dht.c
GNUnet/src/applications/fs/ecrs/download.c
GNUnet/src/applications/fs/ecrs/ecrstest.c
GNUnet/src/applications/fs/ecrs/namespacetest.c
GNUnet/src/applications/fs/ecrs/searchtest.c
GNUnet/src/applications/fs/fsui/download.c
GNUnet/src/applications/fs/fsui/fsui.c
GNUnet/src/applications/fs/fsui/namespace_info.c
GNUnet/src/applications/fs/fsui/search.c
GNUnet/src/applications/fs/fsui/upload.c
GNUnet/src/applications/fs/module/fs.c
GNUnet/src/applications/fs/module/ondemand.c
GNUnet/src/applications/fs/tools/gnunet-download.c
GNUnet/src/applications/fs/tools/gnunet-insert.c
GNUnet/src/applications/fs/tools/gnunet-unindex.c
GNUnet/src/applications/gap/gap.c
GNUnet/src/applications/gap/gaptest.c
GNUnet/src/applications/rpc/rpc.c
GNUnet/src/applications/tbench/tbench.c
GNUnet/src/applications/testbed/commands.c
GNUnet/src/applications/testbed/testbed.c
GNUnet/src/applications/traffic/traffic.c
GNUnet/src/transports/http.c
GNUnet/src/util/os/statuscallstest.c
GNUnet/src/util/threads/timertest.c
Log:
cronTime -> get_time
Modified: GNUnet/src/applications/advertising/advertising.c
===================================================================
--- GNUnet/src/applications/advertising/advertising.c 2006-07-31 03:36:25 UTC
(rev 3193)
+++ GNUnet/src/applications/advertising/advertising.c 2006-07-31 03:37:23 UTC
(rev 3194)
@@ -240,7 +240,7 @@
return SYSERR;
}
- cronTime(&now);
+ now = get_time();
if ( (now - lasthelloMsg) *
getConfigurationInt("LOAD",
"MAXNETDOWNBPSTOTAL") /
Modified: GNUnet/src/applications/bootstrap_http/http.c
===================================================================
--- GNUnet/src/applications/bootstrap_http/http.c 2006-07-31 03:36:25 UTC
(rev 3193)
+++ GNUnet/src/applications/bootstrap_http/http.c 2006-07-31 03:37:23 UTC
(rev 3194)
@@ -194,7 +194,7 @@
/* it ends with four line delimiters: "\r\n\r\n" */
curpos = 0;
while (curpos < 4) {
- if (start + 300 * cronSECONDS < cronTime(NULL))
+ if (start + 300 * cronSECONDS < get_time())
break; /* exit after 5m */
success = RECV_NONBLOCKING(sock,
&c,
@@ -227,12 +227,12 @@
helo = (P2P_hello_MESSAGE*) &buffer[0];
helo->header.type = htons(p2p_PROTO_hello);
- if (start + 300 * cronSECONDS < cronTime(NULL))
+ if (start + 300 * cronSECONDS < get_time())
break; /* exit after 300s */
curpos = 0;
helo->senderAddressSize = 0;
while (curpos < P2P_hello_MESSAGE_size(helo)) {
- if (start + 300 * cronSECONDS < cronTime(NULL))
+ if (start + 300 * cronSECONDS < get_time())
break; /* exit after 300s */
success = RECV_NONBLOCKING(sock,
&((char*)helo)[curpos],
Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c 2006-07-31 03:36:25 UTC
(rev 3193)
+++ GNUnet/src/applications/datastore/datastore.c 2006-07-31 03:37:23 UTC
(rev 3194)
@@ -276,7 +276,7 @@
void * closure) {
int ret;
- if (cronTime(NULL) < ntohll(value->expirationTime))
+ if (get_time() < ntohll(value->expirationTime))
return SYSERR; /* not expired */
ret = sq->del(key, value);
if (ret != SYSERR)
Modified: GNUnet/src/applications/dht/module/datastore_dht_master.c
===================================================================
--- GNUnet/src/applications/dht/module/datastore_dht_master.c 2006-07-31
03:36:25 UTC (rev 3193)
+++ GNUnet/src/applications/dht/module/datastore_dht_master.c 2006-07-31
03:37:23 UTC (rev 3194)
@@ -162,7 +162,7 @@
for (i=0;i<pos->count;i++)
if (equalsHashCode512(&pos->values[i].hash,
(HashCode512*)&value[1])) {
- pos->values[i].lastRefreshTime = cronTime(NULL);
+ pos->values[i].lastRefreshTime = get_time();
MUTEX_UNLOCK(&ds->lock);
return OK; /* already present */
}
@@ -174,7 +174,7 @@
GROW(pos->values,
pos->count,
pos->count+1);
- pos->values[pos->count-1].lastRefreshTime = cronTime(NULL);
+ pos->values[pos->count-1].lastRefreshTime = get_time();
memcpy(&pos->values[pos->count-1].hash,
&value[1],
sizeof(HashCode512));
@@ -196,7 +196,7 @@
memcpy(&pos->values[0].hash,
&value[1],
sizeof(HashCode512));
- pos->values[0].lastRefreshTime = cronTime(NULL);
+ pos->values[0].lastRefreshTime = get_time();
pos->next = ds->first;
ds->first = pos;
MUTEX_UNLOCK(&ds->lock);
Modified: GNUnet/src/applications/dht/module/dht.c
===================================================================
--- GNUnet/src/applications/dht/module/dht.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/dht/module/dht.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -1006,7 +1006,7 @@
pos = MALLOC(sizeof(PeerInfo));
pos->tables = NULL;
pos->tableCount = 0;
- pos->lastTimePingSend = cronTime(NULL);
+ pos->lastTimePingSend = get_time();
vectorInsertLast(bucket->peers, pos);
}
if (pos == NULL) {
@@ -1106,7 +1106,7 @@
MUTEX_LOCK(lock);
info = findPeerInfo(responder);
if (info != NULL)
- info->lastActivity = cronTime(NULL);
+ info->lastActivity = get_time();
MUTEX_UNLOCK(lock);
if (OK != RPC_paramValueByName(results,
@@ -1423,7 +1423,7 @@
processOptionalFields(responder, results);
MUTEX_LOCK(lock);
pos = findPeerInfo(responder);
- pos->lastActivity = cronTime(NULL);
+ pos->lastActivity = get_time();
MUTEX_UNLOCK(lock);
max = RPC_paramCount(results);
@@ -1606,7 +1606,7 @@
}
ret = MALLOC(sizeof(DHT_GET_RECORD));
- ret->timeout = cronTime(NULL) + timeout;
+ ret->timeout = get_time() + timeout;
ret->type = type;
ret->keyCount = keyCount;
ret->keys = MALLOC(keyCount * sizeof(HashCode512));
@@ -1855,7 +1855,7 @@
fnc->k = 0;
fnc->matches = MALLOC(sizeof(HashCode512) * ALPHA);
fnc->signal = SEMAPHORE_NEW(0);
- fnc->timeout = cronTime(NULL) + timeout;
+ fnc->timeout = get_time() + timeout;
fnc->rpcRepliesExpected = 0;
fnc->rpcRepliesReceived = 0;
fnc->async_handle = NULL;
@@ -2078,7 +2078,7 @@
fnc->k = k;
fnc->callback = callback;
fnc->closure = closure;
- fnc->timeout = cronTime(NULL) + timeout;
+ fnc->timeout = get_time() + timeout;
fnc->rpcRepliesExpected = 0;
fnc->rpcRepliesReceived = 0;
fnc->found = 0;
@@ -2186,7 +2186,7 @@
processOptionalFields(responder, results);
MUTEX_LOCK(&record->lock);
pos = findPeerInfo(responder);
- pos->lastActivity = cronTime(NULL);
+ pos->lastActivity = get_time();
max = RPC_paramCount(results);
for (i=0;i<max;i++) {
@@ -2342,7 +2342,7 @@
timeout = 1 * cronHOURS;
}
ret = MALLOC(sizeof(DHT_PUT_RECORD));
- ret->timeout = cronTime(NULL) + timeout;
+ ret->timeout = get_time() + timeout;
ret->key = *key;
ret->table = *table;
ret->callback = callback;
@@ -2487,7 +2487,7 @@
processOptionalFields(responder, results);
MUTEX_LOCK(&record->lock);
pos = findPeerInfo(responder);
- pos->lastActivity = cronTime(NULL);
+ pos->lastActivity = get_time();
max = RPC_paramCount(results);
for (i=0;i<max;i++) {
if (0 != strcmp("peer",
@@ -2616,7 +2616,7 @@
}
ENTER();
ret = MALLOC(sizeof(DHT_REMOVE_RECORD));
- ret->timeout = cronTime(NULL) + timeout;
+ ret->timeout = get_time() + timeout;
ret->key = *key;
ret->table = *table;
ret->callback = callback;
@@ -3375,7 +3375,7 @@
}
for (i=findRecordsSize-1;i>=0;i--) {
if ( (shutdownFlag != NULL) ||
- (findTimes[i] + DHT_MAINTAIN_FIND_FREQUENCY < cronTime(NULL))) {
+ (findTimes[i] + DHT_MAINTAIN_FIND_FREQUENCY < get_time())) {
findNodes_stop(findRecords[i],
NULL,
NULL);
@@ -3391,7 +3391,7 @@
}
for (i=0;i<pingRecordsSize;i++) {
if ( (shutdownFlag != NULL) ||
- (pingTimes[i] + DHT_PING_FREQUENCY < cronTime(NULL))) {
+ (pingTimes[i] + DHT_PING_FREQUENCY < get_time())) {
rpcAPI->RPC_stop(pingRecords[i]);
pingRecords[i] = pingRecords[pingRecordsSize-1];
pingTimes[i] = pingTimes[pingRecordsSize-1];
Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/fs/ecrs/download.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -702,12 +702,12 @@
}
entry = rm->requestList[pos];
- if ( (entry->lasttime < cronTime(NULL)) &&
+ if ( (entry->lasttime < get_time()) &&
(entry->lasttime != 0) ) {
unsigned int weight = 15;
unsigned int ettl = entry->lastTimeout - entry->lasttime;
if ( (ettl > 4 * rm->initialTTL) &&
- ( (cronTime(NULL) - entry->lasttime) < rm->initialTTL) ) {
+ ( (get_time() - entry->lasttime) < rm->initialTTL) ) {
weight = 127;
/* eTTL is MUCH bigger than what we currently expect AND the time
between the last query and the reply was in the range of the
@@ -1224,7 +1224,7 @@
return SYSERR;
}
CLOSE(ret);
- dpcb(0, 0, cronTime(NULL), 0, NULL, 0, dpcbClosure);
+ dpcb(0, 0, get_time(), 0, NULL, 0, dpcbClosure);
return OK;
}
GE_ASSERT(ectx, filename != NULL);
Modified: GNUnet/src/applications/fs/ecrs/ecrstest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrstest.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/fs/ecrs/ecrstest.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -94,7 +94,7 @@
YES, /* index */
0, /* anon */
0, /* prio */
- cronTime(NULL) + 10 * cronMINUTES, /* expire */
+ get_time() + 10 * cronMINUTES, /* expire */
NULL, /* progress */
NULL,
&testTerminate,
@@ -113,7 +113,7 @@
ret = ECRS_addToKeyspace(key,
0,
0,
- cronTime(NULL) + 10 * cronMINUTES, /* expire */
+ get_time() + 10 * cronMINUTES, /* expire */
uri,
meta);
ECRS_freeMetaData(meta);
Modified: GNUnet/src/applications/fs/ecrs/namespacetest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespacetest.c 2006-07-31 03:36:25 UTC
(rev 3193)
+++ GNUnet/src/applications/fs/ecrs/namespacetest.c 2006-07-31 03:37:23 UTC
(rev 3194)
@@ -58,7 +58,7 @@
meta,
0,
0,
- cronTime(NULL) + 5 * cronMINUTES,
+ get_time() + 5 * cronMINUTES,
adv,
&root);
CHECK(NULL != rootURI);
Modified: GNUnet/src/applications/fs/ecrs/searchtest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/searchtest.c 2006-07-31 03:36:25 UTC
(rev 3193)
+++ GNUnet/src/applications/fs/ecrs/searchtest.c 2006-07-31 03:37:23 UTC
(rev 3194)
@@ -127,7 +127,7 @@
CHECK(OK == ECRS_addToKeyspace(key,
0,
0,
- cronTime(NULL) + 10 * cronMINUTES, /* expire */
+ get_time() + 10 * cronMINUTES, /* expire */
uri,
meta));
CHECK(OK == searchFile(key,
@@ -147,7 +147,7 @@
CHECK(OK == ECRS_addToKeyspace(key,
0,
0,
- cronTime(NULL) + 10 * cronMINUTES, /* expire */
+ get_time() + 10 * cronMINUTES, /* expire */
uri,
meta));
CHECK(OK == searchFile(key,
Modified: GNUnet/src/applications/fs/fsui/download.c
===================================================================
--- GNUnet/src/applications/fs/fsui/download.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/fs/fsui/download.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -315,7 +315,7 @@
event.data.DownloadProgress.total = dl->total;
event.data.DownloadProgress.completed = dl->completed;
event.data.DownloadProgress.last_offset = 0;
- event.data.DownloadProgress.eta = cronTime(NULL);
+ event.data.DownloadProgress.eta = get_time();
event.data.DownloadProgress.last_block = NULL;
event.data.DownloadProgress.last_size = 0;
event.data.DownloadProgress.filename = dl->filename;
Modified: GNUnet/src/applications/fs/fsui/fsui.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/fs/fsui/fsui.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -138,7 +138,7 @@
READLONG(ret->completed);
ret->completedFile = 0;
READLONG(ret->startTime);
- ret->startTime = cronTime(NULL) - ret->startTime;
+ ret->startTime = get_time() - ret->startTime;
ret->uri
= readURI(fd);
if (ret->completedDownloadsCount > 0)
@@ -252,7 +252,7 @@
strlen(list->filename));
WRITELONG(fd, list->total);
WRITELONG(fd, list->completed);
- WRITELONG(fd, cronTime(NULL) - list->startTime);
+ WRITELONG(fd, get_time() - list->startTime);
writeURI(fd, list->uri);
for (i=0;i<list->completedDownloadsCount;i++)
writeURI(fd, list->completedDownloads[i]);
Modified: GNUnet/src/applications/fs/fsui/namespace_info.c
===================================================================
--- GNUnet/src/applications/fs/fsui/namespace_info.c 2006-07-31 03:36:25 UTC
(rev 3193)
+++ GNUnet/src/applications/fs/fsui/namespace_info.c 2006-07-31 03:37:23 UTC
(rev 3194)
@@ -167,7 +167,7 @@
getConfigurationInt("FS", "INSERT-PRIORITY"),
getConfigurationInt("FS",
"INSERT-EXPIRATION")
- * cronYEARS + cronTime(NULL),
+ * cronYEARS + get_time(),
advertisementURI,
rootEntry);
/* store binding of namespaceName to 'meta' in state DB! */
@@ -599,7 +599,7 @@
&delta,
&tid);
}
- if (creationTime > cronTime(NULL) + 7 * cronDAYS) {
+ if (creationTime > get_time() + 7 * cronDAYS) {
GE_LOG(ectx, GE_WARNING | GE_BULK | GE_USER,
_("Publishing update for periodically updated "
"content more than a week ahead of schedule.\n"));
@@ -650,7 +650,7 @@
getConfigurationInt("FS", "INSERT-PRIORITY"),
getConfigurationInt("FS",
"INSERT-EXPIRATION")
- * cronYEARS + cronTime(NULL),
+ * cronYEARS + get_time(),
creationTime,
updateInterval,
&tid,
Modified: GNUnet/src/applications/fs/fsui/search.c
===================================================================
--- GNUnet/src/applications/fs/fsui/search.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/fs/fsui/search.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -220,7 +220,7 @@
FSUI_SearchList * pos = cls;
ECRS_search(pos->uri,
pos->anonymityLevel,
- cronTime(NULL) + cronYEARS, /* timeout!?*/
+ get_time() + cronYEARS, /* timeout!?*/
&spcb,
pos,
(ECRS_TestTerminate) &testTerminate,
Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/fs/fsui/upload.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -192,7 +192,7 @@
event.data.UploadComplete.uri = *uri;
event.data.UploadComplete.eta
= (cron_t) (utc->start_time +
- (((double)(cronTime(NULL)
+ (((double)(get_time()
-
utc->start_time/(double)(utc->main_completed+len))))
* (double)utc->main_total);
event.data.UploadComplete.start_time = utc->start_time;
@@ -259,7 +259,7 @@
utc->main_completed += len;
event.data.UploadComplete.eta
= (cron_t) (utc->start_time +
- (((double)(cronTime(NULL)
+ (((double)(get_time()
-
utc->start_time/(double)(utc->main_completed))))
* (double)utc->main_total);
event.data.UploadComplete.start_time = utc->start_time;
@@ -402,7 +402,7 @@
event.data.UploadComplete.completed = utc->main_completed;
event.data.UploadComplete.filename = utc->filename;
event.data.UploadComplete.uri = uri;
- event.data.UploadComplete.eta = cronTime(NULL);
+ event.data.UploadComplete.eta = get_time();
event.data.UploadComplete.start_time = utc->start_time;
event.data.UploadComplete.is_recursive = NO;
event.data.UploadComplete.main_filename = utc->main_filename;
@@ -549,7 +549,7 @@
utc->anonymityLevel = anonymityLevel;
utc->priority = getConfigurationInt("FS",
"INSERT-PRIORITY");
- utc->expiration = cronTime(NULL) + 120 * cronYEARS;
+ utc->expiration = get_time() + 120 * cronYEARS;
utc->ctx = ctx;
utc->isRecursive = NO;
if (doExtract) {
@@ -623,7 +623,7 @@
utc->anonymityLevel = anonymityLevel;
utc->priority = getConfigurationInt("FS",
"INSERT-PRIORITY");
- utc->expiration = cronTime(NULL) + 120 * cronYEARS;
+ utc->expiration = get_time() + 120 * cronYEARS;
utc->extractors = EXTRACTOR_loadDefaultLibraries();
config = getConfigurationString("FS",
"EXTRACTORS");
Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/fs/module/fs.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -1093,7 +1093,7 @@
GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
"FS received QUERY START (query: `%s', ttl %llu, priority %u, anonymity
%u)\n",
&enc,
- ntohll(rs->expiration) - cronTime(NULL),
+ ntohll(rs->expiration) - get_time(),
ntohl(rs->prio),
ntohl(rs->anonymityLevel));
#endif
Modified: GNUnet/src/applications/fs/module/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.c 2006-07-31 03:36:25 UTC
(rev 3193)
+++ GNUnet/src/applications/fs/module/ondemand.c 2006-07-31 03:37:23 UTC
(rev 3194)
@@ -364,11 +364,11 @@
(char *) &enc);
if (stateReadContent(unavail_key,
(void *) &first_unavail) == SYSERR) {
- unsigned long long now = htonll(cronTime(NULL));
+ unsigned long long now = htonll(get_time());
stateWriteContent(unavail_key, sizeof(cron_t), (void *) &now);
} else {
/* Delete it after 3 days */
- if (*first_unavail - cronTime(NULL) > 3 * cronDAYS) {
+ if (*first_unavail - get_time() > 3 * cronDAYS) {
unsigned int len;
char * ofn;
int ret;
Modified: GNUnet/src/applications/fs/tools/gnunet-download.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-download.c 2006-07-31 03:36:25 UTC
(rev 3193)
+++ GNUnet/src/applications/fs/tools/gnunet-download.c 2006-07-31 03:37:23 UTC
(rev 3194)
@@ -162,7 +162,7 @@
event->data.DownloadProgress.completed,
event->data.DownloadProgress.total,
(event->data.DownloadProgress.completed/1024.0) /
- (((double)(cronTime(NULL)-(event->data.DownloadProgress.start_time
- 1)))
+ (((double)(get_time()-(event->data.DownloadProgress.start_time -
1)))
/ (double)cronSECONDS) );
}
break;
@@ -192,7 +192,7 @@
"Speed was %8.3f KiB per second.\n"),
event->data.DownloadProgress.filename,
(event->data.DownloadProgress.completed/1024.0) /
- (((double)(cronTime(NULL)-(event->data.DownloadProgress.start_time
- 1)))
+ (((double)(get_time()-(event->data.DownloadProgress.start_time -
1)))
/ (double)cronSECONDS) );
if (ECRS_equalsUri(event->data.DownloadProgress.main_uri,
event->data.DownloadProgress.uri)) {
Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c 2006-07-31 03:36:25 UTC
(rev 3193)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c 2006-07-31 03:37:23 UTC
(rev 3194)
@@ -131,7 +131,7 @@
if (*verboselevel == YES) {
char * ret;
- delta = event->data.UploadProgress.main_eta - cronTime(NULL);
+ delta = event->data.UploadProgress.main_eta - get_time();
ret = timeIntervalToFancyString(delta);
PRINTF(_("%16llu of %16llu bytes inserted "
"(estimating %s to completion)\n"),
Modified: GNUnet/src/applications/fs/tools/gnunet-unindex.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-unindex.c 2006-07-31 03:36:25 UTC
(rev 3193)
+++ GNUnet/src/applications/fs/tools/gnunet-unindex.c 2006-07-31 03:37:23 UTC
(rev 3194)
@@ -46,7 +46,7 @@
switch(event->type) {
case FSUI_unindex_progress:
if (*verboselevel == YES) {
- delta = event->data.UnindexProgress.eta - cronTime(NULL);
+ delta = event->data.UnindexProgress.eta - get_time();
PRINTF(_("%16llu of %16llu bytes unindexed (estimating %llu seconds to
completion) "),
event->data.UnindexProgress.completed,
event->data.UnindexProgress.total,
@@ -56,7 +56,7 @@
break;
case FSUI_unindex_complete:
if (*verboselevel == YES) {
- delta = cronTime(NULL) - event->data.UnindexComplete.start_time;
+ delta = get_time() - event->data.UnindexComplete.start_time;
PRINTF(
_("\nUnindexing of `%s' complete, %llu bytes took %llu seconds (%8.3f
KiB/s).\n"),
event->data.UnindexComplete.filename,
Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c 2006-07-31 03:36:25 UTC (rev 3193)
+++ GNUnet/src/applications/gap/gap.c 2006-07-31 03:37:23 UTC (rev 3194)
@@ -1833,7 +1833,7 @@
msg->priority
= htonl(prio);
msg->ttl
- = htonl(adjustTTL((int)timeout - cronTime(NULL),
+ = htonl(adjustTTL((int)timeout - get_time(),
prio));
memcpy(&msg->queries[0],
keys,
@@ -1843,7 +1843,7 @@
ret = execQuery(NULL,
prio,
QUERY_ANSWER|QUERY_FORWARD|QUERY_INDIRECT,
- timeout - cronTime(NULL),
+ timeout - get_time(),
msg);
FREE(msg);
return ret;
Modified: GNUnet/src/applications/gap/gaptest.c
===================================================================
--- GNUnet/src/applications/gap/gaptest.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/gap/gaptest.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -102,7 +102,7 @@
YES, /* index */
0, /* anon */
0, /* prio */
- cronTime(NULL) + 10 * cronMINUTES, /* expire */
+ get_time() + 10 * cronMINUTES, /* expire */
NULL, /* progress */
NULL,
&testTerminate,
@@ -121,7 +121,7 @@
ret = ECRS_addToKeyspace(key,
0,
0,
- cronTime(NULL) + 10 * cronMINUTES, /* expire */
+ get_time() + 10 * cronMINUTES, /* expire */
uri,
meta);
ECRS_freeMetaData(meta);
Modified: GNUnet/src/applications/rpc/rpc.c
===================================================================
--- GNUnet/src/applications/rpc/rpc.c 2006-07-31 03:36:25 UTC (rev 3193)
+++ GNUnet/src/applications/rpc/rpc.c 2006-07-31 03:37:23 UTC (rev 3194)
@@ -424,7 +424,7 @@
}
}
pi->agedActivitySend |= 0x80000000;
- pi->lastRequestTimes[pi->oldestRTIndex] = cronTime(NULL);
+ pi->lastRequestTimes[pi->oldestRTIndex] = get_time();
pi->lastRequestId[pi->oldestRTIndex] = messageID;
pi->oldestRTIndex = (pi->oldestRTIndex+1) % MTRACK_COUNT;
MUTEX_UNLOCK(rpcLock);
@@ -434,7 +434,7 @@
memset(pi, 0, sizeof(PeerInfo));
pi->identity = *peer;
pi->agedActivitySend = 0x80000000;
- pi->lastRequestTimes[0] = cronTime(NULL);
+ pi->lastRequestTimes[0] = get_time();
pi->lastRequestId[0] = messageID;
pi->oldestRTIndex = 1;
MUTEX_UNLOCK(rpcLock);
@@ -460,7 +460,7 @@
if (pi->lastRequestTimes[i] != 0) { /* resend */
pi->averageResponseTime
= (pi->averageResponseTime * (MTRACK_COUNT-1) +
- cronTime(NULL) - pi->lastRequestTimes[i]) / MTRACK_COUNT;
+ get_time() - pi->lastRequestTimes[i]) / MTRACK_COUNT;
pi->agedActivityRecv |= 0x80000000;
pi->lastRequestTimes[i] = 0;
}
@@ -627,8 +627,8 @@
cron_t now;
cronTime(&now);
- GE_ASSERT(ectx, (cronTime(NULL) + 1 * cronMINUTES > call->expirationTime) ||
- (call->expirationTime - cronTime(NULL) < 1 * cronHOURS) );
+ GE_ASSERT(ectx, (get_time() + 1 * cronMINUTES > call->expirationTime) ||
+ (call->expirationTime - get_time() < 1 * cronHOURS) );
MUTEX_LOCK(rpcLock);
if (now > call->expirationTime) {
#if DEBUG_RPC
@@ -693,8 +693,8 @@
ntohl(call->msg->importance),
maxdelay);
}
- GE_ASSERT(ectx, (cronTime(NULL) + 1 * cronMINUTES > call->expirationTime)
||
- (call->expirationTime - cronTime(NULL) < 1 * cronHOURS) );
+ GE_ASSERT(ectx, (get_time() + 1 * cronMINUTES > call->expirationTime) ||
+ (call->expirationTime - get_time() < 1 * cronHOURS) );
addCronJob((CronJob) &retryRPCJob,
call->repetitionFrequency,
0,
@@ -837,8 +837,8 @@
results);
vectorInsertLast(incomingCalls, calls);
- GE_ASSERT(ectx, (cronTime(NULL) + 1 * cronMINUTES > calls->expirationTime)
||
- (calls->expirationTime - cronTime(NULL) < 1 * cronHOURS) );
+ GE_ASSERT(ectx, (get_time() + 1 * cronMINUTES > calls->expirationTime) ||
+ (calls->expirationTime - get_time() < 1 * cronHOURS) );
/* for right now: schedule cron job to send reply! */
addCronJob((CronJob)&retryRPCJob,
0,
@@ -907,7 +907,7 @@
pi->averageResponseTime *= 2;
}
RPC_STATUS("", "received duplicate request", calls);
- calls->expirationTime = cronTime(NULL) + MAX_RPC_TIMEOUT;
+ calls->expirationTime = get_time() + MAX_RPC_TIMEOUT;
GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
"Dropping RPC request %u, duplicate.\n",
sq);
@@ -950,7 +950,7 @@
FREE(functionName);
calls->sequenceNumber = sq;
calls->receiver = *sender;
- calls->expirationTime = cronTime(NULL) + MAX_RPC_TIMEOUT;
+ calls->expirationTime = get_time() + MAX_RPC_TIMEOUT;
calls->lastAttempt = 0;
calls->attempts = 0;
calls->finishedCallback = NULL;
@@ -1197,7 +1197,7 @@
call->lastAttempt = 0;
call->attempts = 0;
call->repetitionFrequency = getExpectedResponseTime(receiver);
- call->expirationTime = cronTime(NULL) + timeout;
+ call->expirationTime = get_time() + timeout;
call->receiver = *receiver;
call->sequenceNumber = rpcIdentifier++;
call->msg = buildMessage(RPC_ERROR_OK,
@@ -1208,8 +1208,8 @@
call->finishedCallback = (RPCFinishedCallback) &RPC_execute_callback;
call->rpcCallbackArgs = &cls;
vectorInsertLast(outgoingCalls, call);
- GE_ASSERT(ectx, (cronTime(NULL) + 1 * cronMINUTES > call->expirationTime) ||
- (call->expirationTime - cronTime(NULL) < 1 * cronHOURS) );
+ GE_ASSERT(ectx, (get_time() + 1 * cronMINUTES > call->expirationTime) ||
+ (call->expirationTime - get_time() < 1 * cronHOURS) );
addCronJob((CronJob) &retryRPCJob,
0,
0,
@@ -1279,7 +1279,7 @@
ret->call->lastAttempt = 0;
ret->call->attempts = 0;
ret->call->repetitionFrequency = getExpectedResponseTime(receiver);
- ret->call->expirationTime = cronTime(NULL) + timeout;
+ ret->call->expirationTime = get_time() + timeout;
ret->call->receiver = *receiver;
ret->call->sequenceNumber = rpcIdentifier++;
ret->call->msg = buildMessage(RPC_ERROR_OK,
@@ -1291,8 +1291,8 @@
(RPCFinishedCallback) &RPC_async_callback;
ret->call->rpcCallbackArgs = ret;
vectorInsertLast(outgoingCalls, ret->call);
- GE_ASSERT(ectx, (cronTime(NULL) + 1 * cronMINUTES >
ret->call->expirationTime) ||
- (ret->call->expirationTime - cronTime(NULL) < 1 * cronHOURS) );
+ GE_ASSERT(ectx, (get_time() + 1 * cronMINUTES > ret->call->expirationTime)
||
+ (ret->call->expirationTime - get_time() < 1 * cronHOURS) );
addCronJob((CronJob) &retryRPCJob,
0,
0,
Modified: GNUnet/src/applications/tbench/tbench.c
===================================================================
--- GNUnet/src/applications/tbench/tbench.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/tbench/tbench.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -343,7 +343,7 @@
}
if ( (0 == pollResults(&results[iteration], NO)) &&
(earlyEnd == 0) )
- earlyEnd = cronTime(NULL);
+ earlyEnd = get_time();
}
while ( (timeoutOccured == NO) &&
(cronTime(&now) < endTime) ) {
Modified: GNUnet/src/applications/testbed/commands.c
===================================================================
--- GNUnet/src/applications/testbed/commands.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/testbed/commands.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -1644,7 +1644,7 @@
while (curpos < 4) {
int success;
- if (start + 5 * cronMINUTES < cronTime(NULL))
+ if (start + 5 * cronMINUTES < get_time())
break; /* exit after 5m */
success = RECV_NONBLOCKING(sock,
&c,
@@ -1674,11 +1674,11 @@
while (1) {
int success;
- if (start + 300 * cronSECONDS < cronTime(NULL))
+ if (start + 300 * cronSECONDS < get_time())
break; /* exit after 300s */
curpos = 0;
while (curpos < 65536) {
- if (start + 300 * cronSECONDS < cronTime(NULL))
+ if (start + 300 * cronSECONDS < get_time())
break; /* exit after 300s */
success = RECV_NONBLOCKING(sock,
&buffer[curpos],
Modified: GNUnet/src/applications/testbed/testbed.c
===================================================================
--- GNUnet/src/applications/testbed/testbed.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/testbed/testbed.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -1246,7 +1246,7 @@
while (curpos < 4) {
int success;
- if (start + 5 * cronMINUTES < cronTime(NULL))
+ if (start + 5 * cronMINUTES < get_time())
break; /* exit after 5m */
success = RECV_NONBLOCKING(sock,
&c,
@@ -1271,7 +1271,7 @@
#if DEBUG_TESTBED
GE_LOG(ectx, GE_INFO | GE_REQUEST | GE_USER,
"Exit register (%d seconds before timeout)\n",
- (int)(start + 300 * cronSECONDS - cronTime(NULL))/cronSECONDS);
+ (int)(start + 300 * cronSECONDS - get_time())/cronSECONDS);
#endif
}
Modified: GNUnet/src/applications/traffic/traffic.c
===================================================================
--- GNUnet/src/applications/traffic/traffic.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/applications/traffic/traffic.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -390,7 +390,7 @@
dtc = &counters[messageType]->receive;
updateUse(dtc, 0, 0, YES);
- nowUnit = cronTime(NULL) / TRAFFIC_TIME_UNIT;
+ nowUnit = get_time() / TRAFFIC_TIME_UNIT;
*peerCount = 0;
*messageCount = 0;
totSize = 0;
Modified: GNUnet/src/transports/http.c
===================================================================
--- GNUnet/src/transports/http.c 2006-07-31 03:36:25 UTC (rev 3193)
+++ GNUnet/src/transports/http.c 2006-07-31 03:37:23 UTC (rev 3194)
@@ -906,7 +906,7 @@
continue;
}
if ( ( httpSession->users == 1) &&
- (cronTime(NULL) > httpSession->lastUse + HTTP_TIMEOUT) ) {
+ (get_time() > httpSession->lastUse + HTTP_TIMEOUT) ) {
destroySession(i);
i--;
continue;
Modified: GNUnet/src/util/os/statuscallstest.c
===================================================================
--- GNUnet/src/util/os/statuscallstest.c 2006-07-31 03:36:25 UTC (rev
3193)
+++ GNUnet/src/util/os/statuscallstest.c 2006-07-31 03:37:23 UTC (rev
3194)
@@ -59,11 +59,11 @@
/* need to run each phase for more than 10s since
statuscalls only refreshes that often... */
cronTime(&start);
- while (start + 12 * cronSECONDS > cronTime(NULL))
+ while (start + 12 * cronSECONDS > get_time())
sleep(1);
cronTime(&start);
ret = getCPULoad();
- while (start + 12 * cronSECONDS > cronTime(NULL))
+ while (start + 12 * cronSECONDS > get_time())
sqrt(245.2523); /* do some processing to drive load up */
if (ret > getCPULoad())
printf("busy loop decreased CPU load: %d < %d.\n",
Modified: GNUnet/src/util/threads/timertest.c
===================================================================
--- GNUnet/src/util/threads/timertest.c 2006-07-31 03:36:25 UTC (rev 3193)
+++ GNUnet/src/util/threads/timertest.c 2006-07-31 03:37:23 UTC (rev 3194)
@@ -34,7 +34,7 @@
if (tlast != tnow)
return 2;
while (now == last)
- now = cronTime(NULL);
+ now = get_time();
while (tnow == tlast)
tnow = TIME(NULL);
if (now < last)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3194 - in GNUnet/src: applications/advertising applications/bootstrap_http applications/datastore applications/dht/module applications/fs/ecrs applications/fs/fsui applications/fs/module applications/fs/tools applications/gap applications/rpc applications/tbench applications/testbed applications/traffic transports util/os util/threads,
grothoff <=