summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-24 21:33:13 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-24 23:28:10 +0300
commit64810ef5b4b3d375e7af0f4fc9ee69e235afa568 (patch)
tree6810d0f27a0e38c99370c3c9e8d08443ffe8d76f /src/test
parent9d2eb460fa3569342044b6f3e61d52d86ca8cbb6 (diff)
downloadplus-64810ef5b4b3d375e7af0f4fc9ee69e235afa568.tar.gz
plus-64810ef5b4b3d375e7af0f4fc9ee69e235afa568.tar.bz2
plus-64810ef5b4b3d375e7af0f4fc9ee69e235afa568.tar.xz
plus-64810ef5b4b3d375e7af0f4fc9ee69e235afa568.zip
Fix code style.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/testlauncher.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index 74447af7e..b6acf017a 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -470,15 +470,19 @@ int TestLauncher::testDyeSpeed()
for (int f = 0; f < sz; f ++)
buf[f] = f;
+#if defined __linux__ || defined __linux
clock_gettime(CLOCK_MONOTONIC, &time1);
for (int f = 0; f < 1000; f ++)
pal.replaceSColor(buf, sz);
clock_gettime(CLOCK_MONOTONIC, &time2);
- long diff = ((static_cast<long long int>(time2.tv_sec) * 1000000000LL + static_cast<long long int>(time2.tv_nsec)) / 1) -
- ((static_cast<long long int>(time1.tv_sec) * 1000000000LL + static_cast<long long int>(time1.tv_nsec)) / 1);
+ long diff = ((static_cast<long int>(time2.tv_sec) * 1000000000L
+ + static_cast<long int>(time2.tv_nsec)) / 1) -
+ ((static_cast<long int>(time1.tv_sec) * 1000000000L
+ + static_cast<long int>(time1.tv_nsec)) / 1);
printf("time: %ld\n", diff);
+#endif
return 0;
}