hi, I would like to use a high resolution timer to time some disk accesses. I want to do this in a loop where i start the timer, do a random access of a file, stop the timer, add the number in nanoseconds to the running total for averaging later. The pseudocode looks like this
for i = 1 to 100
start timer
tell it where to go in diskspace
read a few characters
stop timer
add the time i got in this pass to the running total
next i
I know how to do everything except the timer. Ive never used a timer before and im not too fermilliar with c programming for linux or cygwin. Does anyone know how to set up the timer, what libraries i need, how to start it and stop it and how to save the time in some sort of variable? thanks in advance
for i = 1 to 100
start timer
tell it where to go in diskspace
read a few characters
stop timer
add the time i got in this pass to the running total
next i
I know how to do everything except the timer. Ive never used a timer before and im not too fermilliar with c programming for linux or cygwin. Does anyone know how to set up the timer, what libraries i need, how to start it and stop it and how to save the time in some sort of variable? thanks in advance