mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
25 lines
741 B
C++
25 lines
741 B
C++
/*******************************************************************************
|
|
* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
|
|
* Unauthorized copying of this file, via any medium is strictly prohibited.
|
|
* Proprietary and confidential.
|
|
******************************************************************************/
|
|
|
|
#include <chrono>
|
|
#include "Utils.h"
|
|
|
|
namespace zilliz {
|
|
namespace milvus {
|
|
namespace engine {
|
|
|
|
uint64_t
|
|
get_current_timestamp()
|
|
{
|
|
std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now();
|
|
auto duration = now.time_since_epoch();
|
|
auto millis = std::chrono::duration_cast<std::chrono::milliseconds>(duration).count();
|
|
return millis;
|
|
}
|
|
|
|
}
|
|
}
|
|
} |