diff options
author | Dwight <dmerriman@gmail.com> | 2008-03-16 20:59:19 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2008-03-16 20:59:19 -0400 |
commit | bdacd93bb86f41213bd52ad032eedfb48605bcd2 (patch) | |
tree | a5dbcb1b769688190d21a2d13888995d0b4c802b /util | |
parent | 44e0674aa043ed8691d9b789f6048a7ef26f4777 (diff) | |
download | mongo-bdacd93bb86f41213bd52ad032eedfb48605bcd2.tar.gz |
profiling
Diffstat (limited to 'util')
-rw-r--r-- | util/goodies.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/goodies.h b/util/goodies.h index 4fa657600bc..79933a9a2b8 100644 --- a/util/goodies.h +++ b/util/goodies.h @@ -96,6 +96,12 @@ inline unsigned curTimeMillis() { unsigned t = xt.nsec / 1000000;
return (xt.sec & 0xfffff) * 1000 + t;
}
+inline unsigned long long jsTime() {
+ boost::xtime xt;
+ boost::xtime_get(&xt, boost::TIME_UTC);
+ unsigned long long t = xt.nsec / 1000000;
+ return ((unsigned long long) xt.sec * 1000) + t;
+}
// measures up to 1024 seconds. or, 512 seconds with tdiff that is...
inline unsigned curTimeMicros() {
boost::xtime xt;
|