in_proc: use new api for time management
* limitations under the License.
*/
+#include <fluent-bit/flb_info.h>
+#include <fluent-bit/flb_config.h>
+#include <fluent-bit/flb_utils.h>
+#include <fluent-bit/flb_pack.h>
+#include <msgpack.h>
+
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <limits.h>
#include <dirent.h>
-#include <msgpack.h>
-#include <fluent-bit/flb_info.h>
-#include <fluent-bit/flb_config.h>
-#include <fluent-bit/flb_utils.h>
-
#include "in_proc.h"
struct flb_in_proc_mem_offset mem_linux[] = {
@@ -257,7 +258,7 @@ static int generate_record_linux(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);
/* 3 = alive, proc_name, pid */
msgpack_pack_map(&i_ins->mp_pck, map_num);
