Skip to content

Instantly share code, notes, and snippets.

@NalaGinrut
Created August 12, 2013 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NalaGinrut/6209536 to your computer and use it in GitHub Desktop.
Save NalaGinrut/6209536 to your computer and use it in GitHub Desktop.
times function tested under GNU/Hurd, it always returns all zero in tms struct. PS: it's OK under GNU/Linux
#include <sys/times.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
struct tms buf;
if (times(&buf) < 0)
exit(115);
printf("utime: %u\n"
"stime: %u\n"
"cutime: %u\n"
"cstime: %u\n",
buf.tms_utime, buf.tms_stime, buf.tms_cutime, buf.tms_cstime);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment