Created
August 12, 2013 09:39
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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