Added mfb_get_target_fps
This commit is contained in:
@ -22,6 +22,17 @@ mfb_set_target_fps(uint32_t fps) {
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
unsigned
|
||||
mfb_get_target_fps() {
|
||||
if (g_time_for_frame == 0) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
return 1.0 / g_time_for_frame;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
struct mfb_timer *
|
||||
mfb_timer_create() {
|
||||
@ -50,7 +61,7 @@ mfb_timer_destroy(struct mfb_timer *tmr) {
|
||||
//-------------------------------------
|
||||
void
|
||||
mfb_timer_reset(struct mfb_timer *tmr) {
|
||||
if(tmr == 0x0)
|
||||
if(tmr == 0x0)
|
||||
return;
|
||||
|
||||
tmr->start_time = mfb_timer_tick();
|
||||
@ -63,7 +74,7 @@ double
|
||||
mfb_timer_now(struct mfb_timer *tmr) {
|
||||
uint64_t counter;
|
||||
|
||||
if(tmr == 0x0)
|
||||
if(tmr == 0x0)
|
||||
return 0.0;
|
||||
|
||||
counter = mfb_timer_tick();
|
||||
@ -79,7 +90,7 @@ mfb_timer_delta(struct mfb_timer *tmr) {
|
||||
int64_t counter;
|
||||
uint64_t delta;
|
||||
|
||||
if(tmr == 0x0)
|
||||
if(tmr == 0x0)
|
||||
return 0.0;
|
||||
|
||||
counter = mfb_timer_tick();
|
||||
|
Reference in New Issue
Block a user