summary refs log tree commit diff
path: root/mico-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'mico-store.c')
-rw-r--r--mico-store.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mico-store.c b/mico-store.c
index 1083928..38e4b7e 100644
--- a/mico-store.c
+++ b/mico-store.c
@@ -1,5 +1,7 @@
+#include <assert.h>
 #include <stdint.h>
 #include <stdio.h>
+#include <string.h>
 
 #include <zip.h>
 
@@ -179,6 +181,11 @@ main()
 			t = metrics[m].value[i].t;
 			v = metrics[m].value[i].v;
 
+			if (t == pt) {
+				fprintf(stderr, "duplicate timestamp: %ld", t);
+				continue;
+			}
+
 			put1(&ts, (t - pt) - (pt - ppt));
 			put1(&vs, (int32_t)((v - pv) * 10));