in_mem: use new api for time management
* limitations under the License.
*/
+#include <fluent-bit/flb_info.h>
+#include <fluent-bit/flb_input.h>
+#include <fluent-bit/flb_stats.h>
+#include <fluent-bit/flb_kernel.h>
+#include <fluent-bit/flb_pack.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <fluent-bit/flb_input.h>
-#include <fluent-bit/flb_stats.h>
-#include <fluent-bit/flb_kernel.h>
-
#include "proc.h"
#define IN_MEM_COLLECT_SEC 1
@@ -184,7 +186,7 @@ static int in_mem_collect(struct flb_input_instance *i_ins,
flb_input_buf_write_start(i_ins);
msgpack_pack_array(&i_ins->mp_pck, 2);
- msgpack_pack_uint64(&i_ins->mp_pck, time(NULL));
+ flb_pack_time_now(&i_ins->mp_pck);
msgpack_pack_map(&i_ins->mp_pck, entries);
msgpack_pack_bin(&i_ins->mp_pck, 9);
