<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 23, 2017 at 8:53 AM, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A non-integer clock ticks per second value may lead to inaccurate time<br>
format conversions.<br>
<br>
Update #3117.<br>
Update #3182.<br>
---<br>
cpukit/sapi/include/confdefs.h | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/cpukit/sapi/include/<wbr>confdefs.h b/cpukit/sapi/include/<wbr>confdefs.h<br>
index 3dfcf9b2d5..13e97c9487 100755<br>
--- a/cpukit/sapi/include/<wbr>confdefs.h<br>
+++ b/cpukit/sapi/include/<wbr>confdefs.h<br>
@@ -2287,6 +2287,10 @@ extern rtems_initialization_tasks_<wbr>table Initialization_tasks[];<br>
RTEMS_MILLISECONDS_TO_<wbr>MICROSECONDS(10)<br>
#endif<br>
<br>
+ #if 1000000 % CONFIGURE_MICROSECONDS_PER_<wbr>TICK != 0<br>
+ #warning "The clock ticks per second is not an integer"<br>
+ #endif<br>
+<br></blockquote><div><br></div><div>Good idea but if we are going down the paranoid error path, what about negative </div><div>numbers?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
#define _CONFIGURE_TICKS_PER_SECOND (1000000 / CONFIGURE_MICROSECONDS_PER_<wbr>TICK)<br>
<br>
/** The configures the number of clock ticks per timeslice. */<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.12.3<br>
<br>
______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/devel</a><br>
</font></span></blockquote></div><br></div></div>