Browse Source

scaling corrected

master
phyto 3 years ago
parent
commit
090aba2e63
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      essai.c

+ 2
- 2
essai.c View File

@ -53,11 +53,11 @@ while ((opt = getopt(argc, argv, "v")) != -1) {
foo = get_loadavg(loads);
if (foo) fprintf(stderr, "get loadavg -> %d\n", foo);
for (foo=0; foo<3; foo++) {
il[foo] = ((int)(loads[foo] * 900.0)) & 0x3ff;
il[foo] = ((int)(loads[foo] * 90.0)) & 0x3ff;
fprintf(stderr, "%f -> %d\n", loads[foo], il[foo]);
}
printf("T %ld %d %d %d %d\n", time(NULL), getpid()%1024, il[0], il[1], il[2]);
printf("%ld %d %d %d %d\n", time(NULL), getpid()%84, il[0], il[1], il[2]);
return 0;
}


Loading…
Cancel
Save