mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 00:23:35 +00:00
Added jmanager_timer_is_running() function to know if a timer is running.
This commit is contained in:
parent
bd6bff7998
commit
c4e57b2777
@ -662,6 +662,14 @@ void jmanager_set_timer_interval(int timer_id, int interval)
|
||||
timers[timer_id]->interval = interval;
|
||||
}
|
||||
|
||||
bool jmanager_timer_is_running(int timer_id)
|
||||
{
|
||||
assert(timer_id >= 0 && timer_id < n_timers);
|
||||
assert(timers[timer_id] != NULL);
|
||||
|
||||
return (timers[timer_id]->last_time >= 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param msg You can't use the this message after calling this
|
||||
* routine. The message will be automatically freed through
|
||||
|
@ -50,6 +50,7 @@ void jmanager_remove_timer(int timer_id);
|
||||
void jmanager_start_timer(int timer_id);
|
||||
void jmanager_stop_timer(int timer_id);
|
||||
void jmanager_set_timer_interval(int timer_id, int interval);
|
||||
bool jmanager_timer_is_running(int timer_id);
|
||||
|
||||
/* routines that uses the ji_get_default_manager() */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user