MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / sk_step_timer

Function sk_step_timer

StereoKitC/stereokit.cpp:414–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412///////////////////////////////////////////
413
414void sk_step_timer() {
415 local.frame += 1;
416 local.timev_raw = stm_now();
417 double time_curr = stm_sec(local.timev_raw);
418
419 if (local.time_start == 0)
420 local.time_start = time_curr;
421 double new_time = time_curr - local.time_start;
422 local.timev_step_us = new_time - local.timev_us;
423 local.timev_step = (new_time - local.timev_us) * local.timev_scale;
424 local.timev_us = new_time;
425 local.timev += local.timev_step;
426 local.timev_stepf_us = (float)local.timev_step_us;
427 local.timev_stepf = (float)local.timev_step;
428 local.timevf_us = (float)local.timev_us;
429 local.timevf = (float)local.timev;
430}
431
432///////////////////////////////////////////
433

Callers 2

sk_initFunction · 0.85
sk_step_beginFunction · 0.85

Calls 2

stm_nowFunction · 0.85
stm_secFunction · 0.85

Tested by

no test coverage detected