pub fn new(name: &str, time_scale: Time,
        shorthelp_text: &str, longhelp_text: &str) -> Result<Self, String> {

        let metric = Metric::new(
            name,
            0,
            Semantics::Instant,
            Unit::new().time(time_scale, 1)?,
            shorthelp_text,
            longhelp_text
        )?;

        Ok(Timer {
            metric: metric,
            time_scale: time_scale,
            start_time: None
        })
    }
/// Creates a new timer metric with given time scale
Creates a new timer metric with given time scale
Creates a new timer metric with given time scale
pub fn new(name: &str, time_scale: Time,
        shorthelp_text: &str, longhelp_text: &str) -> Result<Self, String> {
        let metric = Metric::new(
            name,
            0,
            Semantics::Instant,
            Unit::new().time(time_scale, 1)?,
            shorthelp_text,
            longhelp_text
        )?;
        Ok(Timer {
            metric: metric,
            time_scale: time_scale,
            start_time: None
        })
    }
pub fn new ( name : & str , time_scale : Time , shorthelp_text : & str , longhelp_text : & str ) -> Result < Self , String > { let metric = Metric :: new ( name , 0 , Semantics :: Instant , Unit :: new ( ) . time ( time_scale , 1 ) ? , shorthelp_text , longhelp_text ) ? ; Ok ( Timer { metric : metric , time_scale : time_scale , start_time : None } ) }
Creates a new timer metric with given time scale
Creates a new timer metric with given time scale
name
&str
time_scale
Time
shorthelp_text
&str
longhelp_text
&str