[PATCH 2/2] complib/cl_event_wheel.c minor update for the sample test program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Honggang Li <honli@xxxxxxxxxx>

Signed-off-by: Honggang Li <honli@xxxxxxxxxx>
---
 complib/cl_event_wheel.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/complib/cl_event_wheel.c b/complib/cl_event_wheel.c
index 27443f66..21e1f4ee 100644
--- a/complib/cl_event_wheel.c
+++ b/complib/cl_event_wheel.c
@@ -457,6 +457,7 @@ uint32_t cl_event_wheel_num_regs(IN cl_event_wheel_t * const p_event_wheel,
 }
 
 #ifdef __CL_EVENT_WHEEL_TEST__
+#include <unistd.h> /* sleep() */
 
 /* Dump out the complete state of the event wheel */
 void __cl_event_wheel_dump(IN cl_event_wheel_t * const p_event_wheel)
@@ -511,14 +512,10 @@ static uint64_t __test_event_aging(uint64_t key, uint32_t num_regs, void *contex
 int main()
 {
 	cl_event_wheel_t event_wheel;
-	/*  uint64_t key; */
 
 	/* init complib */
 	complib_init();
 
-	/* construct */
-	cl_event_wheel_construct(&event_wheel);
-
 	/* init */
 	cl_event_wheel_init(&event_wheel);
 
@@ -534,7 +531,7 @@ int main()
 			   "The Second Aging Event");
 
 	cl_event_wheel_reg(&event_wheel, 3,	/*  key */
-			   cl_get_time_stamp() + 3500000,	/*  3 sec lifetime */
+			   cl_get_time_stamp() + 3500000,	/*  3.5 sec lifetime */
 			   __test_event_aging,	/*  cb */
 			   "The Third Aging Event");
 
@@ -542,7 +539,7 @@ int main()
 
 	sleep(2);
 	cl_event_wheel_reg(&event_wheel, 2,	/*  key */
-			   cl_get_time_stamp() + 8000000,	/*  3 sec lifetime */
+			   cl_get_time_stamp() + 8000000,	/*  8 sec lifetime */
 			   __test_event_aging,	/*  cb */
 			   "The Second Aging Event Moved");
 
-- 
2.14.4




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux