mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 02:18:20 -07:00
Implement rivatimer_get_time and reset time on rivatimer_stop.
This commit is contained in:
@@ -227,6 +227,7 @@ void rivatimer_stop(rivatimer_t* rivatimer_ptr)
|
||||
fatal("rivatimer_stop: The timer has been destroyed, or never existed in the first place. Punch starfrost in the face");
|
||||
|
||||
rivatimer_ptr->running = false;
|
||||
rivatimer_ptr->time = 0;
|
||||
}
|
||||
|
||||
// Get the current time value of a rivatimer
|
||||
@@ -234,6 +235,8 @@ double rivatimer_get_time(rivatimer_t* rivatimer_ptr)
|
||||
{
|
||||
if (!rivatimer_really_exists(rivatimer_ptr))
|
||||
fatal("rivatimer_get_time: The timer has been destroyed, or never existed in the first place. Punch starfrost in the face");
|
||||
|
||||
return rivatimer_ptr->time;
|
||||
}
|
||||
|
||||
void rivatimer_set_callback(rivatimer_t* rivatimer_ptr, void (*callback)())
|
||||
|
||||
Reference in New Issue
Block a user