File tree Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -1005,16 +1005,12 @@ void twin_path_curve(twin_path_t *path,
1005
1005
* timeout.c
1006
1006
*/
1007
1007
1008
- #define twin_time_compare (a , op , b ) (((a) - (b)) op 0)
1009
-
1010
1008
twin_timeout_t * twin_set_timeout (twin_timeout_proc_t timeout_proc ,
1011
1009
twin_time_t delay ,
1012
1010
void * closure );
1013
1011
1014
1012
void twin_clear_timeout (twin_timeout_t * timeout );
1015
1013
1016
- twin_time_t twin_now (void );
1017
-
1018
1014
/*
1019
1015
* toplevel.c
1020
1016
*/
Original file line number Diff line number Diff line change 5
5
*/
6
6
7
7
#include <stdlib.h>
8
+ #include <sys/time.h>
9
+ #include <time.h>
8
10
9
11
#include "twin_private.h"
10
12
13
+ #define twin_time_compare (a , op , b ) (((a) - (b)) op 0)
14
+
15
+ static twin_time_t twin_now (void )
16
+ {
17
+ struct timeval tv ;
18
+ gettimeofday (& tv , NULL );
19
+ return tv .tv_sec * 1000 + tv .tv_usec / 1000 ;
20
+ }
21
+
11
22
static twin_queue_t * head ;
12
23
static twin_time_t start ;
13
24
@@ -82,13 +93,3 @@ twin_time_t _twin_timeout_delay(void)
82
93
}
83
94
return -1 ;
84
95
}
85
-
86
- #include <sys/time.h>
87
- #include <time.h>
88
-
89
- twin_time_t twin_now (void )
90
- {
91
- struct timeval tv ;
92
- gettimeofday (& tv , NULL );
93
- return tv .tv_sec * 1000 + tv .tv_usec / 1000 ;
94
- }
You can’t perform that action at this time.
0 commit comments