changeset 14:61cdb00a3a84

Remove accidentally added BK files
author Lewin Bormann <lbo@spheniscida.de>
date Sun, 14 Feb 2016 14:56:04 +0100
parents 441318144593
children 7432c90d5c07
files src/metrics/mod.rs.bk src/metrics/time.rs.bk
diffstat 2 files changed, 0 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/src/metrics/mod.rs.bk	Sun Feb 14 14:49:16 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-pub mod time;
--- a/src/metrics/time.rs.bk	Sun Feb 14 14:49:16 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-//! A simple clock.
-
-use framework::*;
-
-extern crate chrono;
-use self::chrono::{Local};
-
-struct TimeMetric;
-
-const DEFAULT_FMT: &'static str = "%a %b %d %H:%M:%S %Y (%Z)";
-
-impl Metric for TimeMetric {
-    fn init(&self, st: &mut MetricState, arg: Option<String>) {
-        st.set(String::from("format"), State::S(arg.unwrap_or(String::from(DEFAULT_FMT))));
-    }
-    fn render(&self, st: &mut MetricState) -> RenderResult {
-        let fmt;
-
-        match st.get(String::from("format")) {
-            State::S(f) => fmt = f,
-            _ => fmt = String::from(DEFAULT_FMT),
-        }
-
-        let t = Local::now();
-        let tstr = format!("{}", t.format(&fmt));
-
-        RenderResult::new(tstr, Color::Default)
-    }
-}
-
-pub fn clock_metric() -> Box<Metric> {
-    Box::new(TimeMetric)
-}
-