aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/dat.h b/dat.h
index 6503042..4dd4250 100644
--- a/dat.h
+++ b/dat.h
@@ -1,11 +1,21 @@
typedef struct State State;
typedef struct Derivative Derivative;
+typedef struct Stats Stats;
+
+struct Stats
+{
+ double cur;
+ double total;
+ double min, avg, max;
+ uvlong nupdates;
+
+ void (*update)(Stats*, double);
+};
struct State
{
double x, v;
- double acc, min, max, avg;
- int nsteps;
+ Stats stats;
};
struct Derivative