version 1.18, 2007/04/04 19:22:46 |
version 1.19, 2007/07/16 15:14:33 |
|
|
#include <stdio.h> |
#include <stdio.h> |
#include <string.h> |
#include <string.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
#include <stdint.h> |
|
|
#include "top.h" |
#include "top.h" |
#include "machine.h" |
#include "machine.h" |
|
|
for (i = 0; i < cnt; i++) { |
for (i = 0; i < cnt; i++) { |
if ((change = *new - *old) < 0) { |
if ((change = *new - *old) < 0) { |
/* this only happens when the counter wraps */ |
/* this only happens when the counter wraps */ |
change = (*new - *old); |
change = INT64_MAX - *old + *new; |
} |
} |
total_change += (*dp++ = change); |
total_change += (*dp++ = change); |
*old++ = *new++; |
*old++ = *new++; |