unix programming getusage()

maninred

Create the program 'rusage' that will run a program provided on the command

line and then print out the resources used by the process using the system call

getrusage(). 


The timeval structure (documented in the timeradd man page):


  struct timeval {

    time_t      tv_sec;     /* seconds */

    suseconds_t tv_usec;    /* microseconds */

  };


    • 5 years ago
    • 15
    Answer(0)