From 948b68774cebf2b9a2994b7b9b8102f9637a98f3 Mon Sep 17 00:00:00 2001
From: Shi Xian <40013335+R1ckShi@users.noreply.github.com>
Date: 星期二, 16 一月 2024 11:03:55 +0800
Subject: [PATCH] Merge pull request #1249 from alibaba-damo-academy/main

---
 runtime/onnxruntime/bin/funasr-onnx-offline-punc.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/runtime/onnxruntime/bin/funasr-onnx-offline-punc.cpp b/runtime/onnxruntime/bin/funasr-onnx-offline-punc.cpp
index 8f3149e..f549aae 100644
--- a/runtime/onnxruntime/bin/funasr-onnx-offline-punc.cpp
+++ b/runtime/onnxruntime/bin/funasr-onnx-offline-punc.cpp
@@ -49,7 +49,7 @@
     GetValue(txt_path, TXT_PATH, model_path);
 
     struct timeval start, end;
-    gettimeofday(&start, NULL);
+    gettimeofday(&start, nullptr);
     int thread_num = 1;
     FUNASR_HANDLE punc_hanlde=CTTransformerInit(model_path, thread_num);
 
@@ -59,7 +59,7 @@
         exit(-1);
     }
 
-    gettimeofday(&end, NULL);
+    gettimeofday(&end, nullptr);
     long seconds = (end.tv_sec - start.tv_sec);
     long modle_init_micros = ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);
     LOG(INFO) << "Model initialization takes " << (double)modle_init_micros / 1000000 << " s";
@@ -83,9 +83,9 @@
     
     long taking_micros = 0;
     for(auto& txt_str : txt_list){
-        gettimeofday(&start, NULL);
-        FUNASR_RESULT result=CTTransformerInfer(punc_hanlde, txt_str.c_str(), RASR_NONE, NULL);
-        gettimeofday(&end, NULL);
+        gettimeofday(&start, nullptr);
+        FUNASR_RESULT result=CTTransformerInfer(punc_hanlde, txt_str.c_str(), RASR_NONE, nullptr);
+        gettimeofday(&end, nullptr);
         seconds = (end.tv_sec - start.tv_sec);
         taking_micros += ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);
         string msg = FunASRGetResult(result, 0);

--
Gitblit v1.9.1