#[non_exhaustive]pub struct FrameTimes {
pub update_us: u32,
pub draw_us: u32,
pub paint_us: u32,
pub present_us: u32,
pub frame_us: u32,
}Expand description
How long the parts of one frame took, in whole microseconds. Build it
with FrameTimes::new (ADR-0039); a backend may add a part.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.update_us: u32Game::frame from its start to the drawing: the input, the
modules’ before_update and the screens’ update.
draw_us: u32The drawing: the screens and the modules drawing the frame
(Game::redraw).
paint_us: u32The platform’s present: in shuyi-app, painting the frame into
the window.
present_us: u32From the end of the last frame to the start of this one, outside
App: the backend’s buffer swap and its wait for vsync or the frame
cap. 0 on the first frame measured.
frame_us: u32present_us plus this frame from its start to
its end: never less than the four above together. The rest is
App’s own (the system’s events, the audio, the record).
Implementations§
Source§impl FrameTimes
impl FrameTimes
Trait Implementations§
Source§impl Clone for FrameTimes
impl Clone for FrameTimes
Source§fn clone(&self) -> FrameTimes
fn clone(&self) -> FrameTimes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FrameTimes
Source§impl Debug for FrameTimes
impl Debug for FrameTimes
Source§impl Default for FrameTimes
impl Default for FrameTimes
Source§fn default() -> FrameTimes
fn default() -> FrameTimes
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FrameTimes
impl<'de> Deserialize<'de> for FrameTimes
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FrameTimes
Source§impl JsonSchema for FrameTimes
impl JsonSchema for FrameTimes
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for FrameTimes
impl PartialEq for FrameTimes
Source§impl Serialize for FrameTimes
impl Serialize for FrameTimes
impl StructuralPartialEq for FrameTimes
Auto Trait Implementations§
impl Freeze for FrameTimes
impl RefUnwindSafe for FrameTimes
impl Send for FrameTimes
impl Sync for FrameTimes
impl Unpin for FrameTimes
impl UnsafeUnpin for FrameTimes
impl UnwindSafe for FrameTimes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more