Skip to content

rohankid1/profile_time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

profile_time

This crate provides 2 macros to help you separate debug and release code.

Usage

#[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 {}; 
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages