From 78efb444f4aec9210d31657ae664f0525c8f9085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Sat, 18 Apr 2015 19:34:05 +0000 Subject: [PATCH] pitime replace long to int, for x86_64 git-svn-id: svn://db.shs.com.ru/pip@108 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src/core/pitime.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/pitime.h b/src/core/pitime.h index 0484003d..270a24e5 100755 --- a/src/core/pitime.h +++ b/src/core/pitime.h @@ -60,7 +60,7 @@ public: PISystemTime() {seconds = nanoseconds = 0;} //! Contructs system time with s = "s" and ns = "ns" - PISystemTime(long s, long ns) {seconds = s; nanoseconds = ns; checkOverflows();} + PISystemTime(int s, int ns) {seconds = s; nanoseconds = ns; checkOverflows();} //! Contructs system time from another PISystemTime(const PISystemTime & t) {seconds = t.seconds; nanoseconds = t.nanoseconds;} @@ -148,25 +148,25 @@ public: //! Contructs system time from seconds "v" - static PISystemTime fromSeconds(double v) {long s = piFloord(v); return PISystemTime(s, (v - s) * 1000000000);} + static PISystemTime fromSeconds(double v) {int s = piFloord(v); return PISystemTime(s, (v - s) * 1000000000);} //! Contructs system time from milliseconds "v" - static PISystemTime fromMilliseconds(double v) {long s = piFloord(v / 1000.); return PISystemTime(s, (v / 1000. - s) * 1000000000);} + static PISystemTime fromMilliseconds(double v) {int s = piFloord(v / 1000.); return PISystemTime(s, (v / 1000. - s) * 1000000000);} //! Contructs system time from microseconds "v" - static PISystemTime fromMicroseconds(double v) {long s = piFloord(v / 1000000.); return PISystemTime(s, (v / 1000000. - s) * 1000000000);} + static PISystemTime fromMicroseconds(double v) {int s = piFloord(v / 1000000.); return PISystemTime(s, (v / 1000000. - s) * 1000000000);} //! Contructs system time from nanoseconds "v" - static PISystemTime fromNanoseconds(double v) {long s = piFloord(v / 1000000000.); return PISystemTime(s, (v / 1000000000. - s) * 1000000000);} + static PISystemTime fromNanoseconds(double v) {int s = piFloord(v / 1000000000.); return PISystemTime(s, (v / 1000000000. - s) * 1000000000);} //! Returns current system time static PISystemTime current(bool precise_but_not_system = false); //! Seconds of stored system time - long seconds; + int seconds; //! Nanoseconds of stored system time - long nanoseconds; + int nanoseconds; private: void checkOverflows() {while (nanoseconds >= 1000000000) {nanoseconds -= 1000000000; seconds++;} while (nanoseconds < 0) {nanoseconds += 1000000000; seconds--;}}