From a6163888f3c56123b1db313743c6147ba498732c Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Fri, 8 Aug 2014 14:42:07 +0300 Subject: Add third_party libs --- third_party/uip-1.0/doc/html/a00156.html | 237 +++++++++++++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 third_party/uip-1.0/doc/html/a00156.html (limited to 'third_party/uip-1.0/doc/html/a00156.html') diff --git a/third_party/uip-1.0/doc/html/a00156.html b/third_party/uip-1.0/doc/html/a00156.html new file mode 100644 index 0000000..2eaafce --- /dev/null +++ b/third_party/uip-1.0/doc/html/a00156.html @@ -0,0 +1,237 @@ + + +uIP 1.0: Timer library + + + + +
+
+

Timer library


Detailed Description

+The timer library provides functions for setting, resetting and restarting timers, and for checking if a timer has expired. +

+An application must "manually" check if its timers have expired; this is not done automatically.

+A timer is declared as a struct timer and all access to the timer is made by a pointer to the declared timer.

+

Note:
The timer library uses the Clock library to measure time. Intervals should be specified in the format used by the clock library.
+ +

+ + + + + + + +

+

+ + + +

+

+ + + + + + + + + + + + + + + + +

Files

file  timer.h
 Timer library header file.
file  timer.c
 Timer library implementation.

Data Structures

struct  timer
 A timer. More...

Functions

void timer_set (struct timer *t, clock_time_t interval)
 Set a timer.
void timer_reset (struct timer *t)
 Reset the timer with the same interval.
void timer_restart (struct timer *t)
 Restart the timer from the current point in time.
int timer_expired (struct timer *t)
 Check if a timer has expired.
+


Function Documentation

+

+ + + + +
+ + + + + + + + + +
int timer_expired ( struct timer *  t  ) 
+
+ + + + + +
+   + + +

+Check if a timer has expired. +

+This function tests if a timer has expired and returns true or false depending on its status.

+

Parameters:
+ + +
t A pointer to the timer
+
+
Returns:
Non-zero if the timer has expired, zero otherwise.
+
Examples:
+dhcpc.c, example-mainloop-with-arp.c, and example-mainloop-without-arp.c.
+

+Definition at line 121 of file timer.c. +

+References clock_time(), interval, and start.

+

+ + + + +
+ + + + + + + + + +
void timer_reset ( struct timer *  t  ) 
+
+ + + + + +
+   + + +

+Reset the timer with the same interval. +

+This function resets the timer with the same interval that was given to the timer_set() function. The start point of the interval is the exact time that the timer last expired. Therefore, this function will cause the timer to be stable over time, unlike the timer_rester() function.

+

Parameters:
+ + +
t A pointer to the timer.
+
+
See also:
timer_restart()
+
Examples:
+example-mainloop-with-arp.c, and example-mainloop-without-arp.c.
+

+Definition at line 84 of file timer.c. +

+References interval, and start.

+

+ + + + +
+ + + + + + + + + +
void timer_restart ( struct timer *  t  ) 
+
+ + + + + +
+   + + +

+Restart the timer from the current point in time. +

+This function restarts a timer with the same interval that was given to the timer_set() function. The timer will start at the current time.

+

Note:
A periodic timer will drift if this function is used to reset it. For preioric timers, use the timer_reset() function instead.
+
Parameters:
+ + +
t A pointer to the timer.
+
+
See also:
timer_reset()
+ +

+Definition at line 104 of file timer.c. +

+References clock_time(), and start.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
void timer_set ( struct timer *  t,
clock_time_t  interval
) 
+
+ + + + + +
+   + + +

+Set a timer. +

+This function is used to set a timer for a time sometime in the future. The function timer_expired() will evaluate to true after the timer has expired.

+

Parameters:
+ + + +
t A pointer to the timer
interval The interval before the timer expires.
+
+
Examples:
+dhcpc.c, example-mainloop-with-arp.c, and example-mainloop-without-arp.c.
+

+Definition at line 64 of file timer.c. +

+References clock_time(), interval, and start.

+


Generated on Mon Jun 12 10:23:02 2006 for uIP 1.0 by  + +doxygen 1.4.6
+ + -- cgit v1.3.1