Maintainer: Ian Kelling <ian@iankelling.org>
Bugs, patches, requests, feedback are welcome.
-
-Last tested 7/2016 on Debian testing. Still working great after several
-years.
#include <getopt.h>
#include <unistd.h>
-#define EVENTS 200
+#define EVENTS 400
#define HZ_LIST 64
typedef struct event_s {
unsigned long long time, timediff;
unsigned hz = 0;
- time = (unsigned long long)event.time.tv_sec * 1000ULL;
- time += (unsigned long long)event.time.tv_usec / 1000ULL;
+ time = (unsigned long long)event.time.tv_sec * 1000000ULL;
+ time += (unsigned long long)event.time.tv_usec;
timediff = time - events[i].prev_time;
if(timediff != 0)
- hz = 1000ULL / timediff;
+ hz = 1000000ULL / timediff;
if(hz > 0) {
unsigned j, maxavg;