src/resources.cpp
// We use 'getrusage' for the next two functions, which is pretty standard
// on Unix but probably not available on Windows etc. For different variants
// of Unix not all fields are meaningful (or even existing).
We use 'getrusage' for the next two functions, which is pretty standard
on Unix but probably not available on Windows etc. For different variants
of Unix not all fields are meaningful (or even existing).
We use ' getrusage ' for the next two functions which is pretty standard on Unix but probably not available on Windows etc . For different variants of Unix not all fields are meaningful ( or even existing ) .
double process_time () {
  struct rusage u;
  double res;
  if (getrusage (RUSAGE_SELF, &u)) return 0;
  res = u.ru_utime.tv_sec + 1e-6 * u.ru_utime.tv_usec;  
  res += u.ru_stime.tv_sec + 1e-6 * u.ru_stime.tv_usec; 
  return res;
}
double process_time ( ) { struct rusage u ; double res ; if ( getrusage ( RUSAGE_SELF , & u ) ) return 0 ; res = u . ru_utime . tv_sec + 1e-6 * u . ru_utime . tv_usec ; res += u . ru_stime . tv_sec + 1e-6 * u . ru_stime . tv_usec ; return res ; }
We use 'getrusage' for the next two functions, which is pretty standard
on Unix but probably not available on Windows etc.
We use ' getrusage ' for the next two functions which is pretty standard on Unix but probably not available on Windows etc .
// user time // + system time