title: Do I use Fortran system_clock correctly?
body: <p>I am using the function <code>system_clock</code> with Fortran90 (compiled with gfortran) in the following way :</p>
  
  <pre><code>   ! Variables for clock
     integer count_0, count_1
     integer count_rate, count_max
     double precision time_init, time_final, elapsed_time
  
     ! Starting time
     call system_clock(count_0, count_rate, count_max)
     time_init = count_0*1.0/count_rate
  
     .... Main code
  
     ! Ending time
     call system_clock(count_1, count_rate, count_max)
     time_final = count_1*1.0/count_rate
     ! Elapsed time
     elapsed_time = time_final - time_init
  
     ! Write elapsed time
     write(*,1003) int(elapsed_time),elapsed_time-int(elapsed_time)
  
  1003 format('  Wall Clock = ',i0,f0.9)
  </code></pre>
  
  <p>I would like to know if I use correctly this function. Indeed, I didn't specify a value for <code>count_rate</code> and <code>count_max</code> but I guess there are default values. Moreover, It seems that I have to take into account the case where <code>count_0</code> or <code>count_1</code> are over <code>count_max</code> values, doesn't it. As you can see, for pretty formatting, I have split the seconds and the decimal part of elapsed time.</p>