From: pwpiwi Date: Thu, 26 Jul 2018 15:18:10 +0000 (+0200) Subject: save 2.3K flash-memory by avoiding a single floating point operation (#630) X-Git-Tag: v3.1.0~39 X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/913a54a86accab2a6959c4fcaf53711502f2d954 save 2.3K flash-memory by avoiding a single floating point operation (#630) --- diff --git a/armsrc/util.c b/armsrc/util.c index e25c6e0b..59dfe07b 100644 --- a/armsrc/util.c +++ b/armsrc/util.c @@ -489,13 +489,13 @@ void WaitTicks(uint32_t ticks){ // 1us = 1.5ticks. void WaitUS(uint16_t us){ if ( us == 0 ) return; - WaitTicks( (uint32_t)(us * 1.5) ); + WaitTicks( (uint32_t)us * 3 / 2 ) ; } void WaitMS(uint16_t ms){ if (ms == 0) return; - WaitTicks( (uint32_t)(ms * 1500) ); + WaitTicks( (uint32_t)ms * 1500 ); }