Hello to all those following the Challenge...

As I promised, here I am giving the complete JUDGE solution to Challenge 0010 (attached file). I would like to be excused for the delay, since due to lack of time I had not commented on it properly, nor had I created an application example. I say this because to test the operation of the pdelay function, I do it by simulating a clock.

**********************************************
JUDGE SOLUTION TO CHALLENGE0010 - 20/XII/2000
created by: Jose Luis De la Cruz Lazaro
			contact@theworldofchaos.com
			www.theworldofchaos.com
**********************************************

The idea is very simple, to count how many increments of an integer counter occur in 1 millisecond.

I called these increments subticks, because a tick can be divided into an integer number of subticks, and better yet, 1 millisecond also has an integer number of subticks, which must be calculated by statistical methods.

The number of "subticks per millisecond" depends mainly on the compiler used and the speed of the processor, so it is necessary to implement a function that counts how many subticks exist in 1 tick ( SubTicks() ) and another that calculates the average of the result returned by SubTicks() over a certain number of trials (this is done by SubTicksAverage() ).

Once the number of "subticks per millisecond" has been calculated, pdelay can then be used, since a linear interpolation (or simple rule of three) would be enough to determine the number of subticks in t milliseconds ( T ), and to pause by executing a loop that would have T steps.

PORTABILITY OF pdelay(): ANSI C
Functions required for its use: Subticks() and SucTicksMedio()
Global variable required: SubTicks_per_ms

Regards

       o  o Jose Luis De la Cruz Lazaro   o   220KV of Chaos
     o       o  Visit my homepage:          o      o
   o    o o    o THE WORLD OF CHAOS           o   o o
  o   o  o     o   https://www.theworldofchaos.com   o  o
  o    o     o                                   o    o  o
   o     o o     Chaos = Chaos & math ? C++ : ++C;        o
     o                                                     o
        o  o  o o o  FRACTALS UNLIMITED ooo o  o  o  o  o   o
                    o  o   o   o   o   o
     o               o   o   o   o   o
   o   o      o
 o      o   o  o  o  o  o o oooo      Yacsha Software & Desing
                                 O  O  o ooo Lima - Peru ooo o o O  O
