Usage:
fn main() {
puffin::set_scopes_on(true); // you may want to control this with a flag
// game loop
loop {
puffin::GlobalProfiler::lock().new_frame();
{
puffin::profile_scope!("slow_code");
slow_code();
}
}
}
# fn slow_code(){}
Usage:
fn main() {
puffin::set_scopes_on(true); // you may want to control this with a flag
// game loop
loop {
puffin::GlobalProfiler::lock().new_frame();
{
puffin::profile_scope!("slow_code");
slow_code();
}
}
}
# fn slow_code(){}