mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 15:46:57 +00:00
[OpenTK] Implemented GameWindow.UpdateTime and RenderTime properties
This commit is contained in:
parent
3856fcd48e
commit
56a3dd91e5
|
@ -446,6 +446,7 @@ namespace OpenTK
|
||||||
update_timestamp = timestamp;
|
update_timestamp = timestamp;
|
||||||
}
|
}
|
||||||
timestamp = watch.Elapsed.TotalSeconds;
|
timestamp = watch.Elapsed.TotalSeconds;
|
||||||
|
update_time = timestamp - update_timestamp;
|
||||||
} while (next_update <= 0 && ++frameskip < max_frameskip);
|
} while (next_update <= 0 && ++frameskip < max_frameskip);
|
||||||
|
|
||||||
double render_elapsed = MathHelper.Clamp(timestamp - render_timestamp, 0.0, 1.0);
|
double render_elapsed = MathHelper.Clamp(timestamp - render_timestamp, 0.0, 1.0);
|
||||||
|
@ -453,6 +454,8 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
render_timestamp = timestamp;
|
render_timestamp = timestamp;
|
||||||
}
|
}
|
||||||
|
timestamp = watch.Elapsed.TotalSeconds;
|
||||||
|
render_time = timestamp - render_timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RaiseUpdateFrame(double time, ref double next_update)
|
bool RaiseUpdateFrame(double time, ref double next_update)
|
||||||
|
|
Loading…
Reference in a new issue