diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-12-31 19:04:44 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-12-31 19:04:44 +0000 |
| commit | a45786ef1b51ea26fb9d14dbaf521738035a9f5c (patch) | |
| tree | 0b2fcc566a7f2186c3626a4807cd317c6b6db367 /render.c | |
| parent | render: presentation: log both input -> commit and commit -> presented times (diff) | |
render: presentation: also use seconds when calculating frame interval count
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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++; |
