Last change
on this file since 2843 was
2843,
checked in by charles, 15 years ago
|
update version.sh to exclude third-party. add $Id:$ to the new files s.t. version.sh will find them.
|
File size:
1.3 KB
|
Line | |
---|
1 | /* |
---|
2 | * This file Copyright (C) 2007 Charles Kerr <charles@rebelbase.com> |
---|
3 | * |
---|
4 | * This file is licensed by the GPL version 2. Works owned by the |
---|
5 | * Transmission project are granted a special exemption to clause 2(b) |
---|
6 | * so that the bulk of its code can remain under the MIT license. |
---|
7 | * This exemption does not extend to derived works not owned by |
---|
8 | * the Transmission project. |
---|
9 | * |
---|
10 | * $Id: |
---|
11 | */ |
---|
12 | |
---|
13 | #ifndef _TR_TIMER_H_ |
---|
14 | #define _TR_TIMER_H_ |
---|
15 | |
---|
16 | typedef struct timer_node * tr_timer_tag; |
---|
17 | |
---|
18 | /** |
---|
19 | * Calls timer_func(user_data) after the specified interval. |
---|
20 | * The timer is freed if timer_func returns zero. |
---|
21 | * Otherwise, it's called again after the same interval. |
---|
22 | * |
---|
23 | * If free_func is non-NULL, free_func(user_data) is called |
---|
24 | * by the timer when it's freed (either from timer_func returning |
---|
25 | * zero or from a client call to tr_timerFree). This is useful |
---|
26 | * if user_data has resources that need to be freed. |
---|
27 | */ |
---|
28 | tr_timer_tag tr_timerNew( struct tr_handle_s * handle, |
---|
29 | int timer_func( void * user_data ), |
---|
30 | void * user_data, |
---|
31 | void free_func( void * user_data ), |
---|
32 | int timeout_milliseconds ); |
---|
33 | |
---|
34 | /** |
---|
35 | * Frees a timer and sets its tag to NULL. |
---|
36 | */ |
---|
37 | void tr_timerFree( tr_timer_tag * tag ); |
---|
38 | |
---|
39 | |
---|
40 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.