about summary refs log tree commit diff
path: root/src/rt/sync/timer.cpp
diff options
context:
space:
mode:
authorMichael Bebenita <mbebenita@mozilla.com>2010-09-10 01:21:29 -0700
committerMichael Bebenita <mbebenita@mozilla.com>2010-09-10 14:38:31 -0700
commita493350eb5ab38ba8a6563f3eb4a090d257b0d3a (patch)
treedc984eaa28a55de9f05db0b961a0e67f80ca35ef /src/rt/sync/timer.cpp
parentf985fded3ede8a7677ca6c9c77817d27bc9ae492 (diff)
downloadrust-a493350eb5ab38ba8a6563f3eb4a090d257b0d3a.tar.gz
rust-a493350eb5ab38ba8a6563f3eb4a090d257b0d3a.zip
Cleanup, refactoring, and some runtime tests.
Diffstat (limited to 'src/rt/sync/timer.cpp')
-rw-r--r--src/rt/sync/timer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rt/sync/timer.cpp b/src/rt/sync/timer.cpp
index 0487b39796f..e6fe3688893 100644
--- a/src/rt/sync/timer.cpp
+++ b/src/rt/sync/timer.cpp
@@ -25,6 +25,11 @@ timer::get_elapsed_time() {
     return get_time() - _start;
 }
 
+double
+timer::get_elapsed_time_in_ms() {
+    return (double) get_elapsed_time() / 1000.0;
+}
+
 int64_t
 timer::get_timeout() {
     return _timeout - get_elapsed_time();