[gnote] Fix TimeSpan microsecond handling



commit ede5d5abe3c2aba0a9c1f6def2662319c5c3635c
Author: Aurimas Äernius <aurisc4 gmail com>
Date:   Thu Jul 5 23:12:24 2012 +0300

    Fix TimeSpan microsecond handling
    
    m_usec stores microseconds, rather than miliseconds.

 src/sharp/timespan.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/sharp/timespan.cpp b/src/sharp/timespan.cpp
index 6502de7..8bb1a4f 100644
--- a/src/sharp/timespan.cpp
+++ b/src/sharp/timespan.cpp
@@ -74,13 +74,13 @@ namespace sharp {
 
   double TimeSpan::total_seconds() const
   {
-    return _total_seconds() + m_usecs / 1000.0;
+    return _total_seconds() + m_usecs / 1000000.0;
   }
 
 
   double TimeSpan::total_milliseconds() const
   {
-    return _total_seconds() * 60.0 + m_usecs;
+    return _total_seconds() * 60.0 + m_usecs / 1000.0;
   }
 
 
@@ -159,7 +159,7 @@ namespace sharp {
 
   double TimeSpan::_remaining_seconds() const
   {
-    return m_seconds + m_usecs / 1000.0;
+    return m_seconds + m_usecs / 1000000.0;
   }
 
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]