Commit 2fb21a9f authored by captainwong's avatar captainwong

testing linux build 2

parent 4bb75322
......@@ -25,22 +25,22 @@ using Timestamp = date::sys_time<std::chrono::microseconds>;
inline Timestamp nowTimestamp() { return floor<std::chrono::microseconds>(std::chrono::system_clock::now()); }
//! (first - second) duration in micro-seconds
inline constexpr long long timeDifference(const Timestamp& first, const Timestamp& second) {
inline long long timeDifference(const Timestamp& first, const Timestamp& second) {
return floor<std::chrono::microseconds>(first - second).count();
}
//! (nowTimestamp - t) duration in micro-seconds
inline constexpr long long timeDifference(const Timestamp& t) {
inline long long timeDifference(const Timestamp& t) {
return floor<std::chrono::microseconds>(nowTimestamp() - t).count();
}
//! (first - second) duration in seconds(double)
inline constexpr double timeDifferenceInS(const Timestamp& first, const Timestamp& second) {
inline double timeDifferenceInS(const Timestamp& first, const Timestamp& second) {
return static_cast<double>(floor<std::chrono::microseconds>(first - second).count()) / 1000000.0;
}
//! (nowTimestamp - t) duration in seconds(double)
inline constexpr double timeDifferenceInS(const Timestamp& t) {
inline double timeDifferenceInS(const Timestamp& t) {
return static_cast<double>(floor<std::chrono::microseconds>(nowTimestamp() - t).count()) / 1000000.0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment