Skip to content

Commit

Permalink
修复Windows上MSVC无法成功编译的Bug(原因是自定义的GetCurrentTime函数与VC内置函数重名)。
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxlinkage committed Jul 10, 2024
1 parent 55902fd commit a9b6236
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/apiserver/apiserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ using socket_t = int;
#include <thread>
#include "model.h"

long long GetCurrentTime() {
long long _GetCurrentTime() {
auto now = std::chrono::high_resolution_clock::now();
auto duration = now.time_since_epoch();
return std::chrono::duration_cast<std::chrono::seconds>(duration).count();
Expand Down Expand Up @@ -430,7 +430,7 @@ struct WorkQueue {
}

std::string curId = "fastllm-" + GenerateRandomID();
auto createTime = GetCurrentTime();
auto createTime = _GetCurrentTime();

if (isStream) {
message = "";
Expand Down

0 comments on commit a9b6236

Please sign in to comment.