All things computing, software engineering and physics related!
Saturday, 29 October 2011
Its all in the timing!
Trying to get my head round how the code deals with real time aspects of the simulation and have come across yet another new function for me! The code uses the ETIME function to monitor the actual run time - still tying to figure out how this is used within the code thought!
Anyway in my search for what this function does I came across the following definition - which I believe is courtesy of my old boss at the University of Florida (thanks Bob!).
Though Bambofy - again - told me what this function did before I checked - apparently its used frequently in gaming programmes!
Two functions ETIME and DTIME. let FORTRAN programs measure time. This is useful for perfomance tuning. They are used as follows:
REAL TIMEARRAY (2)
ELAPSE = ETIME(TIMEARRAY)
ETIME returns a real number which is the total CPU time used for this process it began executing. DTIME returns a real number which is the running time for this process since the last call to DTIME. Both procedures use TIMEARRAY to return the user time and system time separately; TIMEARRAY(1) reports the user time, and TIMEARRAY(2) supports the system time. For example, the statements
REAL DELAPSE TIMEARRAY(2), X
DO 10 I=1, 100000
set DELAPSE to the time required to compute the loop DO 10 1=1,100000.