summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-04-16 17:04:58 +0000
committerNick Mathewson <nickm@torproject.org>2003-04-16 17:04:58 +0000
commit33176c70a5b9bb345d96af22178c003e177b2bb9 (patch)
tree10336e1543ad7f638f0f147e65864ef7a3eb6e66 /src/or/main.c
parent0c61bc3756e833abe97999fa2a22b944a9ce3931 (diff)
downloadtor-33176c70a5b9bb345d96af22178c003e177b2bb9.tar.gz
tor-33176c70a5b9bb345d96af22178c003e177b2bb9.zip
Factor out timeval-related functions.
svn:r237
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 023836d4bf..e0341061eb 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -307,8 +307,7 @@ int prepare_for_poll(int *timeout) {
cell_t cell;
circuit_t *circ;
- if(gettimeofday(&now,NULL) < 0)
- return -1;
+ my_gettimeofday(&now);
if(now.tv_sec > current_second) { /* the second has rolled over. check more stuff. */
@@ -535,8 +534,7 @@ void dumpstats(void) { /* dump stats to stdout */
extern char *conn_state_to_string[][15];
printf("Dumping stats:\n");
- if(gettimeofday(&now,NULL) < 0)
- return ;
+ my_gettimeofday(&now);
for(i=0;i<nfds;i++) {
conn = connection_array[i];