diff options
| -rw-r--r-- | command.c | 8 | ||||
| -rw-r--r-- | runloop.c | 7 | ||||
| -rw-r--r-- | util.c | 9 | ||||
| -rw-r--r-- | util.h | 6 | 
4 files changed, 17 insertions, 13 deletions
| @@ -9,13 +9,7 @@  #include "db.h"  #include "net.h"  #include "user_data.h" - - -static i64 make_timestamp(void){ -	struct timeval tv; -	gettimeofday(&tv,NULL); -	return (i64)tv.tv_sec*1000000+tv.tv_usec; -} +#include "util.h"  static bool cmd_register(struct conn_data *data,const char *tag,const char **args){ @@ -3,6 +3,7 @@  #include <sys/select.h>  #include <sys/time.h>  #include "runloop.h" +#include "util.h"  struct fd_list_item{ @@ -25,12 +26,6 @@ static void constructor(void){  } -static i64 make_timestamp(void){ -	struct timeval tv; -	gettimeofday(&tv,NULL); -	return (i64)tv.tv_sec*1000000+tv.tv_usec; -} -  void runloop_set_timeout(i64 usecs,runloop_callback *cb){  	timeout_usecs=usecs;  	timeout_callback=cb; @@ -0,0 +1,9 @@ +#include <sys/time.h> +#include "util.h" + + +i64 make_timestamp(void){ +	struct timeval tv; +	gettimeofday(&tv,NULL); +	return (i64)tv.tv_sec*1000000+tv.tv_usec; +} @@ -0,0 +1,6 @@ +#pragma once + +#include "global.h" + + +i64 make_timestamp(void); | 
