The position of the dram cache in the memory

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ary function gettimeofday. This function queries the system clock to determine the current date and time. #include "time.h" struct timeval long tv sec; /* Seconds */ long tv usec; /* Microseconds */ int gettimeofday(struct timeval *tv, NULL); Returns: 0 for success, -1 for failure The function writes the time into a structure passed by the caller that includes one field in units of seconds, and another field in units of microseconds. The first field encodes the total number of seconds that have elapsed since January 1, 1970. (This is the standard reference point for all Unix systems.) Note that the second argument to gettimeofday should simply be NULL on Linux systems, since it refers to an unimplemented feature for performing time zone correction. Practice Problem 9.8: On what date will the tv sec field written by gettimeofday become negative on a 32-bit machine? As shown in Figure 9.20, we can can use gettimeofday to create a pair of timer functions start timer and get timer that are similar to our cycle-timing functions, except that they measur...
View Full Document

Ask a homework question - tutors are online