]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
utime: fix operator double() to use the right number of zeros.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 11 Mar 2011 19:24:59 +0000 (11:24 -0800)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 11 Mar 2011 19:24:59 +0000 (11:24 -0800)
We should probably use a const (or even a #define would be better)
instead of typing out the constant in all these places!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/include/utime.h

index 1333837cfb4085af7e5b28df18fb8ffd4f4fdbda..7a8e0d7f6483cba3acb02ae4ed8f05170e959ec3 100644 (file)
@@ -98,7 +98,7 @@ public:
 
   // cast to double
   operator double() {
-    return (double)sec() + ((double)nsec() / 100000000.0L);
+    return (double)sec() + ((double)nsec() / 1000000000.0L);
   }
   operator ceph_timespec() {
     ceph_timespec ts;