X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_format.h;h=1a58ebb6f8cf266b652aafff9871494da7c4030f;hb=e8615c408aaed016d27e4d0a3c21513409b4d6cf;hp=da0f1ba46c54329b78ab27a33c6a9608b0249403;hpb=a1fe8fd19bb4f558150e52c0624869667b739877;p=rrdtool.git diff --git a/src/rrd_format.h b/src/rrd_format.h index da0f1ba..1a58ebb 100644 --- a/src/rrd_format.h +++ b/src/rrd_format.h @@ -19,22 +19,12 @@ *****************************************************************************/ #define RRD_COOKIE "RRD" -#define RRD_VERSION "0002" +/* #define RRD_VERSION "0002" */ +/* changed because microsecond precision requires another field */ +#define RRD_VERSION "0003" #define FLOAT_COOKIE 8.642135E130 -#if defined(WIN32) -#define DNAN ((double)fmod(0.0,0.0)) -#define DINF ((double)log(0.0)) -#else - -#define DNAN ((double)(0.0/0.0)) /* we use a DNAN to - * represent the UNKNOWN - * */ -#define DINF ((double)(1.0/0.0)) /* we use a DINF to - * represent a value at the upper or - * lower border of the graph ... - * */ -#endif +#include "rrd_nan_inf.h" typedef union unival { unsigned long u_cnt; @@ -260,6 +250,8 @@ typedef struct rra_def_t { typedef struct live_head_t { time_t last_up; /* when was rrd last updated */ + long last_up_usec; /* micro seconds part of the + update timestamp. Always >= 0 */ } live_head_t;