diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-25 23:13:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-25 23:31:02 +0300 |
commit | ac0ae65802fddf79ce94bf9229bae094de0d688e (patch) | |
tree | b06e2111834e165cda1400a3fd1f405f272cc059 /src/test/testlauncher.cpp | |
parent | af86a79f6ac5c11d1986be8a3d549fef03482789 (diff) | |
download | mv-ac0ae65802fddf79ce94bf9229bae094de0d688e.tar.gz mv-ac0ae65802fddf79ce94bf9229bae094de0d688e.tar.bz2 mv-ac0ae65802fddf79ce94bf9229bae094de0d688e.tar.xz mv-ac0ae65802fddf79ce94bf9229bae094de0d688e.zip |
Add missing checks into test directory.
Diffstat (limited to 'src/test/testlauncher.cpp')
-rw-r--r-- | src/test/testlauncher.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index a2738c8ba..84890fe85 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -188,7 +188,7 @@ int TestLauncher::testFps() } gettimeofday(&end, nullptr); - const int tFps = calcFps(&start, &end, cnt); + const int tFps = calcFps(start, end, cnt); file << mTest << std::endl; file << tFps << std::endl; @@ -220,7 +220,7 @@ int TestLauncher::testFps2() } gettimeofday(&end, nullptr); - const int tFps = calcFps(&start, &end, cnt); + const int tFps = calcFps(start, end, cnt); file << mTest << std::endl; file << tFps << std::endl; @@ -267,7 +267,7 @@ int TestLauncher::testFps3() } gettimeofday(&end, nullptr); - const int tFps = calcFps(&start, &end, cnt); + const int tFps = calcFps(start, end, cnt); file << mTest << std::endl; file << tFps << std::endl; @@ -406,7 +406,7 @@ int TestLauncher::testInternal() } gettimeofday(&end, nullptr); - const int tFps = calcFps(&start, &end, cnt); + const int tFps = calcFps(start, end, cnt); file << mTest << std::endl; file << tFps << std::endl; file << mem << std::endl; @@ -657,15 +657,16 @@ int TestLauncher::testVideoDetection() return 0; } -int TestLauncher::calcFps(const timeval *const start, const timeval *const end, +int TestLauncher::calcFps(const timeval &start, + const timeval &end, const int calls) const { long mtime; long seconds; long useconds; - seconds = end->tv_sec - start->tv_sec; - useconds = end->tv_usec - start->tv_usec; + seconds = end.tv_sec - start.tv_sec; + useconds = end.tv_usec - start.tv_usec; mtime = (seconds * 1000 + useconds / 1000.0) + 0.5; if (mtime == 0) |