Skip to content

Commit

Permalink
Deprecate date with std::chrono
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Jun 3, 2024
1 parent 94ce120 commit 15efa97
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 16 deletions.
1 change: 0 additions & 1 deletion cmake/deps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
abseil_cpp;https://github.com/abseil/abseil-cpp/archive/refs/tags/20240116.0.zip;bc2cec6baaad67fcb6c0c38972b687d4797927e9
coremltools;https://github.com/apple/coremltools/archive/refs/tags/7.1.zip;f1bab0f30966f2e217d8e01207d518f230a1641a
cxxopts;https://github.com/jarro2783/cxxopts/archive/3c73d91c0b04e2b59462f0a741be8c07024c1bc0.zip;6c6ca7f8480b26c8d00476e0e24b7184717fe4f0
date;https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.1.zip;2dac0c81dc54ebdd8f8d073a75c053b04b56e159
dlpack;https://github.com/dmlc/dlpack/archive/refs/tags/v0.6.zip;4d565dd2e5b31321e5549591d78aa7f377173445
# This Eigen commit id matches the eigen archive being consumed from https://gitlab.com/libeigen/eigen/-/archive/3.4/eigen-3.4.zip
# prior to the 3.4.1 RC changing the bits and invalidating the hash.
Expand Down
11 changes: 0 additions & 11 deletions include/onnxruntime/core/common/logging/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
#include "core/common/logging/capture.h"
#include "core/common/logging/severity.h"

#include "core/common/logging/macros.h"

#include "date/date.h"

/*
Logging overview and expected usage:
Expand Down Expand Up @@ -58,14 +54,7 @@ namespace logging {

using Timestamp = std::chrono::time_point<std::chrono::system_clock>;

// TODO: When other compilers support std::chrono::operator<<, update this.
// TODO: Check support for other compilers' version before enable C++20 for other compilers.
// Xcode added support for C++20's std::chrono::operator<< in SDK version 14.4.
#if __cplusplus >= 202002L && __MAC_OS_X_VERSION_MAX_ALLOWED >= 140400L
namespace timestamp_ns = std::chrono;
#else
namespace timestamp_ns = ::date;
#endif

#ifndef NDEBUG
ORT_ATTRIBUTE_UNUSED static bool vlog_enabled = true; // Set directly based on your needs.
Expand Down
1 change: 0 additions & 1 deletion onnxruntime/core/platform/posix/logging/syslog_sink.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "core/common/logging/logging.h"
#include "core/common/logging/capture.h"
#include "syslog_sink.h"
#include "date/date.h"

namespace onnxruntime {
namespace logging {
Expand Down
1 change: 0 additions & 1 deletion onnxruntime/core/platform/windows/logging/etw_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#ifdef ETW_TRACE_LOGGING_SUPPORTED

#include <date/date.h>
#include <atomic>
#include <iostream>
#include <string>
Expand Down
2 changes: 0 additions & 2 deletions onnxruntime/test/util/include/capturing_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include "core/common/logging/logging.h"
#include "core/common/logging/isink.h"

#include "date/date.h"

namespace onnxruntime {
namespace test {

Expand Down

0 comments on commit 15efa97

Please sign in to comment.