u/ft: Spelling

This commit is contained in:
Jakob Bornecrantz 2021-04-06 20:29:18 +01:00
parent 971f88f34f
commit 670906ea0e

View file

@ -146,9 +146,9 @@ ns_to_ms(int64_t t)
} }
static uint64_t static uint64_t
get_procent_of_time(uint64_t time_ns, uint32_t fraction_procent) get_percent_of_time(uint64_t time_ns, uint32_t fraction_percent)
{ {
double fraction = (double)fraction_procent / 100.0; double fraction = (double)fraction_percent / 100.0;
return time_s_to_ns(time_ns_to_s(time_ns) * fraction); return time_s_to_ns(time_ns_to_s(time_ns) * fraction);
} }
@ -493,15 +493,15 @@ u_ft_display_timing_create(uint64_t estimated_frame_period_ns, struct u_frame_ti
dt->present_offset_ns = U_TIME_1MS_IN_NS * 4; dt->present_offset_ns = U_TIME_1MS_IN_NS * 4;
// Start at this of frame time. // Start at this of frame time.
dt->app_time_ns = get_procent_of_time(estimated_frame_period_ns, 10); dt->app_time_ns = get_percent_of_time(estimated_frame_period_ns, 10);
// Max app time, write a better compositor. // Max app time, write a better compositor.
dt->app_time_max_ns = get_procent_of_time(estimated_frame_period_ns, 30); dt->app_time_max_ns = get_percent_of_time(estimated_frame_period_ns, 30);
// When missing, back off in these increments // When missing, back off in these increments
dt->adjust_missed_ns = get_procent_of_time(estimated_frame_period_ns, 4); dt->adjust_missed_ns = get_percent_of_time(estimated_frame_period_ns, 4);
// When not missing frames but adjusting app time at these increments // When not missing frames but adjusting app time at these increments
dt->adjust_non_miss_ns = get_procent_of_time(estimated_frame_period_ns, 2); dt->adjust_non_miss_ns = get_percent_of_time(estimated_frame_period_ns, 2);
// Extra margin that is added to app time. // Extra margin that is added to app time.
dt->min_margin_ns = get_procent_of_time(estimated_frame_period_ns, 8); dt->min_margin_ns = get_percent_of_time(estimated_frame_period_ns, 8);
*out_uft = &dt->base; *out_uft = &dt->base;