From 00fa5480c13dedb9d8e9e3b24d48c82b4c9a4533 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Sun, 10 Nov 2013 13:52:40 -0800 Subject: [PATCH] get rid of magic number --- animation-server/src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/animation-server/src/main.cpp b/animation-server/src/main.cpp index d1269044ce..e9e8a9857d 100644 --- a/animation-server/src/main.cpp +++ b/animation-server/src/main.cpp @@ -633,9 +633,10 @@ void* animateVoxels(void* args) { uint64_t now = usecTimestampNow(); uint64_t animationElapsed = now - lastAnimateTime; int withinAnimationTarget = ANIMATE_VOXELS_INTERVAL_USECS - animationElapsed; + const int CLOSE_ENOUGH_TO_ANIMATE = 2000; // approximately 2 ms int animateLoopsPerAnimate = 0; - while (withinAnimationTarget < 2000) { + while (withinAnimationTarget < CLOSE_ENOUGH_TO_ANIMATE) { processesPerAnimate = 0; animateLoopsPerAnimate++;