* Added a is_timer_running() function.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27631 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-09-19 09:11:12 +00:00
parent e167a0a5d9
commit 491da20dbf
4 changed files with 10 additions and 0 deletions

View File

@ -143,6 +143,7 @@ struct net_stack_module_info {
bool (*cancel_timer)(struct net_timer *timer);
status_t (*wait_for_timer)(struct net_timer *timer);
bool (*is_timer_active)(struct net_timer *timer);
bool (*is_timer_running)(struct net_timer *timer);
// syscall restart
bool (*is_syscall)(void);

View File

@ -915,6 +915,7 @@ net_stack_module_info gNetStackModule = {
cancel_timer,
wait_for_timer,
is_timer_active,
is_timer_running,
is_syscall,
is_restarted_syscall,

View File

@ -571,6 +571,13 @@ is_timer_active(net_timer* timer)
}
bool
is_timer_running(net_timer* timer)
{
return timer == sCurrentTimer;
}
static int
dump_timer(int argc, char** argv)
{

View File

@ -75,6 +75,7 @@ void set_timer(net_timer* timer, bigtime_t delay);
bool cancel_timer(struct net_timer* timer);
status_t wait_for_timer(struct net_timer* timer);
bool is_timer_active(net_timer* timer);
bool is_timer_running(net_timer* timer);
status_t init_timers(void);
void uninit_timers(void);