aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/time.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/util/time.rs')
-rw-r--r--components/util/time.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/util/time.rs b/components/util/time.rs
index 96d037c520a..abe35633e92 100644
--- a/components/util/time.rs
+++ b/components/util/time.rs
@@ -5,6 +5,7 @@
//! Timing functions.
use collections::TreeMap;
+use std::borrow::ToOwned;
use std::comm::{Sender, channel, Receiver};
use std::f64;
use std::io::timer::sleep;
@@ -144,7 +145,7 @@ impl TimeProfiler {
Some(period) => {
let period = Duration::milliseconds((period * 1000f64) as i64);
let chan = chan.clone();
- spawn_named("Time profiler timer", proc() {
+ spawn_named("Time profiler timer".to_owned(), proc() {
loop {
sleep(period);
if chan.send_opt(TimeProfilerMsg::Print).is_err() {
@@ -153,14 +154,14 @@ impl TimeProfiler {
}
});
// Spawn the time profiler.
- spawn_named("Time profiler", proc() {
+ spawn_named("Time profiler".to_owned(), proc() {
let mut profiler = TimeProfiler::new(port);
profiler.start();
});
}
None => {
// No-op to handle messages when the time profiler is inactive.
- spawn_named("Time profiler", proc() {
+ spawn_named("Time profiler".to_owned(), proc() {
loop {
match port.recv_opt() {
Err(_) | Ok(TimeProfilerMsg::Exit) => break,