The Fortran manual you got does not discuss this routine, but it is a simple and very useful routine. Each computer and compiler have their own fast clock. This clock is ticking from the start of the routine at a given number of ticks per second. This will become clear via an example. Let's assume you want to calculate the time it takes for a given action to complete.
Most clocks can only resolve milliseconds or tens of milliseconds.
Put this module in a separate file . Reasonable values are anywhere from 10,000 to 1,000,000. You will know whether the value is large enough if the results of your program do not fluctuate when you execute the program several times. You will know it is too large if you have to wait for more than a few minutes for your program to complete. Compiler optimization and timing The above will work OK in most cases, but it has some dangers that need to be pointed out.