Rework diff numbers
This commit is contained in:
parent
07de3cb84e
commit
d726bc1982
16
main.c
16
main.c
|
@ -90,19 +90,19 @@ int main(int argc, char* argv[]) {
|
|||
}
|
||||
|
||||
unsigned long drbytes = 0;
|
||||
if(history[i][1] > 0) {
|
||||
drbytes = rbytes - history[i][1];
|
||||
if(history[i][0] > 0) {
|
||||
drbytes = rbytes - (history[i][0] * bsize);
|
||||
}
|
||||
|
||||
|
||||
unsigned long dwblbks = 0;
|
||||
if (history[i][2] > 0) {
|
||||
dwblbks = wblks - history[i][2];
|
||||
if (history[i][1] > 0) {
|
||||
dwblbks = wblks - history[i][1];
|
||||
}
|
||||
|
||||
unsigned long dwbytes = 0;
|
||||
if(history[i][3] > 0) {
|
||||
dwbytes = wbytes - history[i][3];
|
||||
if(history[i][1] > 0) {
|
||||
dwbytes = wbytes - (history[i][1] * bsize);
|
||||
}
|
||||
|
||||
|
||||
|
@ -119,9 +119,7 @@ int main(int argc, char* argv[]) {
|
|||
dwbytes);
|
||||
|
||||
history[i][0] = rblks;
|
||||
history[i][1] = rbytes;
|
||||
history[i][2] = wblks;
|
||||
history[i][3] = wbytes;
|
||||
history[i][1] = wblks;
|
||||
}
|
||||
|
||||
sleep(10);
|
||||
|
|
Loading…
Reference in a new issue