Reorganize includes a bit.
[novacoin.git] / src / util.h
index 1b119d6..3ef7331 100644 (file)
@@ -35,6 +35,8 @@
 
 #include "netbase.h" // for AddTimeData
 
+static const int32_t nOneHour = 60 * 60;
+static const int32_t nOneDay = 24 * 60 * 60;
 
 static const int64_t COIN = 1000000;
 static const int64_t CENT = 10000;
@@ -368,7 +370,7 @@ inline int64_t GetPerformanceCounter()
 
 inline int64_t GetTimeMillis()
 {
-    return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
+    return (boost::posix_time::microsec_clock::universal_time() -
             boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_milliseconds();
 }