Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
hoterran committed Jul 9, 2012
1 parent a962c31 commit 204f436
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ a simple timing-wheel timer, use double list.

##use
- create a wheels, wheel_size is 60 slot, granularity is 200ms.
>Tw *tw = init(60, 200);
- add three time event into wheels.
- start timer
>add(tw, 1000, 2000, a1, (void*)1, Repeat);
>add(tw, 100000, 200000, a1, (void*)2, Once);
>add(tw, 0, 10000, p1, tw, Repeat);
>Tw *tw = init(60, 200);
add(tw, 1000, 2000, a1, (void*)1, Repeat);
add(tw, 100000, 200000, a1, (void*)2, Once);
add(tw, 0, 10000, p1, tw, Repeat);
start(tw);
- start timer
>start(tw);

0 comments on commit 204f436

Please sign in to comment.