summaryrefslogtreecommitdiffstats
path: root/third_party/rust/profiling/src/puffin_impl.rs
blob: 5566648a4665e3e44fd3284af171b30e16ff1fb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#[macro_export]
macro_rules! scope {
    ($name:expr) => {
        $crate::puffin::profile_scope!($name);
    };
    ($name:expr, $data:expr) => {
        $crate::puffin::profile_scope!($name, $data);
    };
}

#[macro_export]
macro_rules! register_thread {
    () => {};
    ($name:expr) => {
        // puffin uses the thread name
    };
}

/// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
/// normal thing to track in games.
#[macro_export]
macro_rules! finish_frame {
    () => {
        $crate::puffin::GlobalProfiler::lock().new_frame();
    };
}