Arbortext Command Language > Functions by Alphabetical Listing > times
  
times
time = times ([arr])
The times function fills the array arr with four elements giving the user and system CPU times, in 1/100th seconds, for this process and the children of this process. It returns the sum of arr [1] and arr [2], that is, the total user and system time for the process. If arr is not given, then only the total time is returned. For example, to time a section of Arbortext Command Language code:
times($t1)
# whatever code here
times($t2)
$tdiff = $t2[1] - $t1[1]
eval "user time:", $tdiff/100 . '.' . $tdiff%100
$tdiff = $t2[2] - $t1[2]
eval "system time:", $tdiff/100 . '.' . $tdiff%100