summaryrefslogtreecommitdiff
path: root/resourceqt-client/time-stat.c
diff options
context:
space:
mode:
authorWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-09-09 10:12:20 +0300
committerWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-09-09 10:12:20 +0300
commit6290bd4353974745f46e2711947d063503f29323 (patch)
tree78b92ef53140ea0e2c0eafb22c4f302102590b03 /resourceqt-client/time-stat.c
parentcd3f7b97ddced403fe2d6eb9091a8903ea186128 (diff)
Changed timer to return ms as a long int
Diffstat (limited to 'resourceqt-client/time-stat.c')
-rw-r--r--resourceqt-client/time-stat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/resourceqt-client/time-stat.c b/resourceqt-client/time-stat.c
index 6fb4fdc..c18daa5 100644
--- a/resourceqt-client/time-stat.c
+++ b/resourceqt-client/time-stat.c
@@ -1,6 +1,7 @@
+#include <math.h>
#include "time-stat.h"
-static struct timespec start_time = {0,0};
+static struct timespec start_time;
int start_timer(void)
{
@@ -13,7 +14,7 @@ int start_timer(void)
return 0;
}
-double stop_timer(void)
+long int stop_timer(void)
{
struct timespec end_time;
int r;
@@ -28,6 +29,6 @@ double stop_timer(void)
start_time.tv_sec = 0;
start_time.tv_nsec = 0;
- return milliseconds;
+ return lround(milliseconds);
}