diff options
author | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-10-20 15:29:18 +0300 |
---|---|---|
committer | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-10-20 15:29:18 +0300 |
commit | 28c22cf2a21387fb1fb4768533f97b957e0ec1fb (patch) | |
tree | a7c3c37438a6cfded6cf8531e4d8b5340b8cdcdd | |
parent | a9edd27d97c7819ddc574b5d9c6b21bd468d1972 (diff) | |
parent | cb0c1eac16226ca3cb8063bbbac8b3924a358ef7 (diff) |
Merge branch 'master' into meego
-rw-r--r-- | resourceqt-client/resourceqt-client.pro | 2 | ||||
-rw-r--r-- | resourceqt-client/time-stat.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/resourceqt-client/resourceqt-client.pro b/resourceqt-client/resourceqt-client.pro index 50507fa..99a69b1 100644 --- a/resourceqt-client/resourceqt-client.pro +++ b/resourceqt-client/resourceqt-client.pro @@ -33,7 +33,7 @@ CONFIG -= app_bundle INCLUDEPATH += $${LIBRESOURCEINC} QMAKE_CXXFLAGS += -Wall QMAKE_CFLAGS += -std=c99 -D_POSIX_C_SOURCE=199309L -LIBS += -L$${LIBRESOURCEQT}/build -lresourceqt -L$${LIBDBUSQEVENTLOOP}/build -ldbus-qeventloop -lm -lrt +LIBS += -L$${LIBRESOURCEQT}/build -lresourceqt -L$${LIBDBUSQEVENTLOOP}/build -ldbus-qeventloop -lrt # Input HEADERS = client.h commandlineparser.h time-stat.h diff --git a/resourceqt-client/time-stat.c b/resourceqt-client/time-stat.c index f28ae02..efa35a2 100644 --- a/resourceqt-client/time-stat.c +++ b/resourceqt-client/time-stat.c @@ -51,8 +51,8 @@ long int stop_timer(void) temp.tv_nsec = end_time.tv_nsec - start_time.tv_nsec; } - milliseconds = 1000 * temp.tv_sec + temp.tv_nsec / 1000; - if (temp.tv_nsec % 1000 > 500) { + milliseconds = (1000 * temp.tv_sec) + (temp.tv_nsec / 1000000); + if (temp.tv_nsec % 1000000 > 500000) { ++milliseconds; } } |