diff tests/libclient/animation/main.cpp @ 41:3645200f46bf

Misc: switch to Boost.Timer, closes #586
author David Demelier <markand@malikania.fr>
date Sun, 27 Nov 2016 20:50:38 +0100
parents d4f5f7231b84
children a47a4477f347
line wrap: on
line diff
--- a/tests/libclient/animation/main.cpp	Sun Nov 27 20:00:13 2016 +0100
+++ b/tests/libclient/animation/main.cpp	Sun Nov 27 20:50:38 2016 +0100
@@ -76,7 +76,7 @@
 
 TEST_F(TestAnimation, draw)
 {
-    ElapsedTimer timer;
+    boost::timer::cpu_timer timer;
 
     try {
         Animation animation = m_loader.loadAnimation("animations/margins.json");
@@ -85,7 +85,7 @@
         auto x = (400 / 2) - (animation.sprite().cell().width() / 2);
         auto y = (400 / 2) - (animation.sprite().cell().height() / 2);
 
-        while (timer.elapsed() < 8000) {
+        while (timer.elapsed().wall / 1000000LL < 8000) {
             window.clear();
             animator.draw(window, Point(x, y));
             animator.update();