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
27
28
#[cfg(not(target_arch = "wasm32"))]
#[macro_use]
pub mod error_log_desktop;
#[cfg(target_arch = "wasm32")]
#[macro_use]
pub mod error_log_wasm;
#[cfg(not(target_arch = "wasm32"))]
pub use error_log_desktop::*;
#[cfg(not(target_arch = "wasm32"))]
pub use error_log_desktop as makepad_error_log;
#[cfg(target_arch = "wasm32")]
pub use error_log_wasm::*;
#[cfg(target_arch = "wasm32")]
pub use error_log_wasm as makepad_error_log;
use std::time::Instant;
pub fn profile_start() -> Instant {
Instant::now()
}
pub fn profile_end(instant: Instant) {
log!("Profile time {} ms", (instant.elapsed().as_nanos() as f64) / 1000000f64);
}