Browse Source

Add start_timer_nodelay()

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
0a3c2b80ea
2 changed files with 13 additions and 0 deletions
  1. 1
    0
      src/include/gpxe/retry.h
  2. 12
    0
      src/net/retry.c

+ 1
- 0
src/include/gpxe/retry.h View File

35
 };
35
 };
36
 
36
 
37
 extern void start_timer ( struct retry_timer *timer );
37
 extern void start_timer ( struct retry_timer *timer );
38
+extern void start_timer_nodelay ( struct retry_timer *timer );
38
 extern void stop_timer ( struct retry_timer *timer );
39
 extern void stop_timer ( struct retry_timer *timer );
39
 
40
 
40
 /**
41
 /**

+ 12
- 0
src/net/retry.c View File

73
 	       timer, timer->start, ( timer->start + timer->timeout ) );
73
 	       timer, timer->start, ( timer->start + timer->timeout ) );
74
 }
74
 }
75
 
75
 
76
+/**
77
+ * Start timer with no delay
78
+ *
79
+ * @v timer		Retry timer
80
+ *
81
+ * This starts the timer running with a zero timeout value.
82
+ */
83
+void start_timer_nodelay ( struct retry_timer *timer ) {
84
+	start_timer ( timer );
85
+	timer->timeout = 0;
86
+}
87
+
76
 /**
88
 /**
77
  * Stop timer
89
  * Stop timer
78
  *
90
  *

Loading…
Cancel
Save