Mercurial > hg > fxanalyse
view sr-data-logger.h @ 254:67c8ace9d5f6
Save time strings in UTC time and rotate datafiles at midnight UTC
Time strings '05/06/2015 00:00:00.014' in datafiles were reported in
Paris local time and the data files were rotated at midnight Paris
time. Switch to use UTC time for both.
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Fri, 05 Jun 2015 18:06:12 +0200 |
parents | 97112b45b838 |
children |
line wrap: on
line source
#ifndef __SR_DATA_LOGGER_H__ #define __SR_DATA_LOGGER_H__ struct datalogger { int enabled; unsigned int sock; /* configuration parameters */ char *id; char *host; int port; }; int sr_datalogger_init(struct datalogger *dl); void sr_datalogger_dispose(struct datalogger *dl); int __sr_datalogger_send(struct datalogger *dl, double utc, double data); static inline int sr_datalogger_send(struct datalogger *dl, double utc, double data) { if (dl->enabled) return __sr_datalogger_send(dl, utc, data); return 0; } #endif