diff --git a/http/http_event.c b/http/http_event.c
index f02fdeb..fd31c9e 100644
--- a/http/http_event.c
+++ b/http/http_event.c
@@ -14,6 +14,14 @@
#include <event.h>
#include "http_event.h"
+s32 http_event_add (struct event *ev, s_time *time)
+{
+ struct timeval tv;
+ tv.tv_sec = time->tv_sec;
+ tv.tv_usec = time->tv_nsec / 1000;
+ return event_add(ev, &tv);
+}
+
void http_event_set (struct event *ev, s32 fd, s16 event,
const s_cfn *cfn, s_tag *arg)
{
diff --git a/http/http_event.h b/http/http_event.h
index 27a26fb..62492cd 100644
--- a/http/http_event.h
+++ b/http/http_event.h
@@ -15,6 +15,7 @@
#include "types.h"
+s32 http_event_add (struct event *ev, s_time *time);
void http_event_set (struct event *ev, s32 fd, s16 event,
const s_cfn *cfn, s_tag *arg);