#include "common/utils.hpp"
#include <chrono>
#include <iomanip>
#include <sstream>

#include "ByteTrack.h"
#include "common/data.hpp"

std::string getTimeString()
{
    auto now = std::chrono::system_clock::now();
    auto t = std::chrono::system_clock::to_time_t(now);
    auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()) % 1000;
    
    std::tm tm = *std::localtime(&t);
    
    std::ostringstream oss;
    oss << std::put_time(&tm, "%Y_%m_%d_%H_%M_%S") 
        << "_" << std::setfill('0') << std::setw(3) << ms.count(); // 添加毫秒部分
    return oss.str();
}
