Generating square wave using NXP LPC1768?
The comment of "Chris Stratton" is good for a simple measuring, and for learning

For the theoretically approach there are some basic you need to know about software:
A while loop takes time (even the following empty one).

while(1){

}


this means that the following code will take more time then 10ms

while(1){
  io_up;
  wait(5ms);
  io_down;
  wait(5ms);
}


Further you need to know that the relation between frequency and time is

frequency=1/time
time=1/frequency


Which makes that more time is a lower frequency and vice versa.

At last i want to add that the use of a wait statement in embedded software is a vary bad practice. It makes it impossible to do multiple things simultaneously in a microprocessor. For timing critical software one should use interrupts, for non critical software one should use time-flags and and state-machines. So to create a stable signal of 100hz in a LPC1768 one should use the timer-matching-compare unit of the processor