Debian Codegraph @

.cargo/vendor/profiling/src/puffin_impl.rs

raw
1 #[macro_export]
2 macro_rules! scope {
3 ($name:expr) => {
4 $crate::puffin::profile_scope!($name);
5 };
6 ($name:expr, $data:expr) => {
7 $crate::puffin::profile_scope!($name, $data);
8 };
9 }
10
11 #[macro_export]
12 macro_rules! function_scope {
13 () => {
14 $crate::puffin::profile_function!();
15 };
16 ($data:expr) => {
17 $crate::puffin::profile_function!($data);
18 };
19 }
20
21 #[macro_export]
22 macro_rules! register_thread {
23 () => {};
24 ($name:expr) => {
25 // puffin uses the thread name
26 };
27 }
28
29 /// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
30 /// normal thing to track in games.
31 #[macro_export]
32 macro_rules! finish_frame {
33 () => {
34 $crate::puffin::GlobalProfiler::lock().new_frame();
35 };
36 }