mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-12 04:27:51 -05:00
render: presentation: also use seconds when calculating frame interval count
This commit is contained in:
parent
dd3e9346cf
commit
a45786ef1b
1 changed files with 2 additions and 2 deletions
4
render.c
4
render.c
|
|
@ -98,9 +98,9 @@ presented(void *data,
|
|||
"presented (total: %luµs)", diff.tv_usec);
|
||||
|
||||
unsigned frame_count = 0;
|
||||
if (diff.tv_sec == 0 && tll_length(term->window->on_outputs) > 0) {
|
||||
if (tll_length(term->window->on_outputs) > 0) {
|
||||
const struct monitor *mon = tll_front(term->window->on_outputs);
|
||||
frame_count = (double)diff.tv_usec / (1. / mon->refresh * 1000000.);
|
||||
frame_count = (double)(diff.tv_sec * 1000000 + diff.tv_usec) / (1. / mon->refresh * 1000000.);
|
||||
}
|
||||
|
||||
presentation_statistics.total++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue