aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/time.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-01-21 03:48:49 -0700
committerbors-servo <metajack+bors@gmail.com>2015-01-21 03:48:49 -0700
commit8df0ee2bb5d40e4b22db1666982e2e5ea36513f6 (patch)
tree6bed465dae6bda2340db62dec1c40f0fd1d77513 /components/util/time.rs
parent94ebc7c32d5ce58ada3f9d8ffdb60cc025eb5997 (diff)
parent808315926cf5fd49c26fcbbc4e2a2d281b3fca46 (diff)
downloadservo-8df0ee2bb5d40e4b22db1666982e2e5ea36513f6.tar.gz
servo-8df0ee2bb5d40e4b22db1666982e2e5ea36513f6.zip
auto merge of #4703 : servo/servo/task, r=saneyuki
IntoString has been removed from Rust, and named() will take a String, so there is no good reason to do otherwise here.
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,