Linux® Debugging and Performance Tuning: Tips and …

The sampletime code shown in Listing 1.3 uses gettimeofday to measure the time it takes to sleep for 200 seconds. The gettimeofday routine could be used to measure how long it takes to write or read a file. Listing 1.4 is the pseudocode that could be used to time a write call. Listing 1.3. sampletime.c. 1 #include 2 #include ................
................