From 7783f301935e49ce3b3a4adb698d3845aa9c0653 Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Wed, 20 Jul 2011 13:38:34 -0400 Subject: [PATCH] Bug 672207. Add toMicroseconds() for more precision. r=cjones --HG-- extra : rebase_source : a363b3c67c0cebf72777347e741e2499067c1fa3 --- xpcom/ds/TimeStamp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xpcom/ds/TimeStamp.h b/xpcom/ds/TimeStamp.h index 67a2c5a9baab..9616d5ca8374 100644 --- a/xpcom/ds/TimeStamp.h +++ b/xpcom/ds/TimeStamp.h @@ -78,6 +78,9 @@ public: double ToMilliseconds() const { return ToSeconds() * 1000.0; } + double ToMicroseconds() const { + return ToMilliseconds() * 1000.0; + } // Using a double here is safe enough; with 53 bits we can represent // durations up to over 280,000 years exactly. If the units of