aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2018-11-13 18:20:08 -0500
committerDeterminant <ted.sybil@gmail.com>2018-11-13 18:20:08 -0500
commit2c1e8ec448a1039ab9a46bce4c959e6ec3cefeb8 (patch)
tree3389de1c53b304eee74e12d9e2adfbc2ab39fef1 /src/util.cpp
parent7645971cd6e21ebcf5dd1800bb1f1393284ee0c9 (diff)
working on p2p; switch to libuv (libevent sucks in multi-threading)
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 6c8866d..b975f13 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -29,7 +29,6 @@
#include <ctime>
#include <sys/time.h>
#include <cmath>
-#include <event2/event.h>
#include "salticidae/util.h"
@@ -40,13 +39,6 @@ void sec2tv(double t, struct timeval &tv) {
tv.tv_usec = trunc((t - tv.tv_sec) * 1e6);
}
-void event_add_with_timeout(struct event *ev, double timeout) {
- struct timeval tv;
- tv.tv_sec = trunc(timeout);
- tv.tv_usec = trunc((timeout - tv.tv_sec) * 1e6);
- event_add(ev, &tv);
-}
-
double gen_rand_timeout(double base_timeout, double alpha) {
return base_timeout + rand() / (double)RAND_MAX * alpha * base_timeout;
}