le jeudi matin, c'est parfois difficile :)

This commit is contained in:
2018-12-06 11:14:29 +01:00
parent 474814ad11
commit 8da6c9ffd6
2 changed files with 33 additions and 0 deletions

15
funcs.c
View File

@@ -36,3 +36,18 @@ return (double)tv.tv_sec + (double)tv.tv_usec / 1e6;
/* --------------------------------------------------------------- */
double get_loadavg(int foo)
{
FILE *fp;
if ( ! (fp=fopen("/proc/loadavg", "r")) ) {
perror("read loadavg");
return -42.51;
}
fclose(fp);
return -42.51;
}
/* --------------------------------------------------------------- */