Crates.io | profile_time |
lib.rs | profile_time |
version | 0.1.1 |
source | src |
created_at | 2022-08-30 16:42:49.081347 |
updated_at | 2022-08-30 17:03:30.371911 |
description | Provides 2 simple macros to separate debug code and release code |
homepage | https://github.com/rohankid1/profile_time |
repository | https://github.com/rohankid1/profile_time |
max_upload_size | |
id | 655238 |
size | 2,975 |
This crates provides 2 macros to help you separate debug and release code.
#[macro_use]
extern crate profile_time;
release_time! {
struct Release {}
}
fn print_profile() {
release_time! {
println!("On release");
}
debug_time! {
println!("On debug");
}
}
debug_time! {
struct Debug {}
}
fn main() {
release_time! {
let profile = Release {};
}
print_profile();
debug_time! {
let profile = Debug {};
}
}