timer

Accession:50185
return amount of processor time used by a hoc call<br> only tested under LINUX (other UNIX systems may require changing #include -- see 'man clock') <br> // time("job()") will return processor time required to run job<br> // if tmstr is set then time() will run job listed there (default "run()")<br> // prints out date before and after as well as processor time so can assess loading<br> // if CPU is unloaded real elapsed time should equal processor time<br>
Tool Information (Click on a link to find other Tools with that property)
Tool Type: Utility;
Simulation Environment: NEURON;
\
timer
README
prtime.mod
time.hoc
                            
% $Id: README.prtime,v 1.3 2005/03/25 13:32:29 billl Exp $  
  
only tested under Linux/Unix  
may also run under Mac OS X  
unlikely to run under MSWin  
  
to test   
  
nrnivmodl prtime  
nrngui time.hoc  
  
// enter a simple procedure eg  
proc aa () { local ii  
  for ii=1,1e6 cos(ii)+log(ii)+exp(-ii)  
}  
  
// and time it  
  
time("aa()")  
  
also provides:  
 now() // returns time in sec since 01/01/05  
 sleepfor(SEC) // sleeps for SEC secs