X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=metrics.c;fp=metrics.c;h=36ef90bf1c86b661204745b83aced491e675ed84;hb=383fc95ff68a2b9a2772e2b12febb1830c32e260;hp=1c8a973aec28e7cc23400270b298f693d1232993;hpb=85faadffd4f13cefceec2c3166b3e1596d4bfd35;p=fips diff --git a/metrics.c b/metrics.c index 1c8a973..36ef90b 100644 --- a/metrics.c +++ b/metrics.c @@ -144,6 +144,9 @@ metrics_create (metrics_info_t *info) /* Get the first frame timestamp started immediately. */ glQueryCounter (metrics->swap_end_timestamp_id, GL_TIMESTAMP); + /* As well as the initial CPU time. */ + clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &metrics->cpu_time_ts); + return metrics; }