#include "base/time/time.h"
#include <atomic>
#include <cmath>
#include <limits>
#include <optional>
#include <ostream>
#include <tuple>
#include <utility>
#include "base/check.h"
#include "base/format_macros.h"
#include "base/strings/stringprintf.h"
#include "base/third_party/nspr/prtime.h"
#include "base/time/time_override.h"
#include "build/build_config.h"
namespace base {
namespace {
TimeTicks g_shared_time_ticks_at_unix_epoch;
}
namespace internal {
std::atomic<TimeNowFunction> g_time_now_function{ … };
std::atomic<TimeNowFunction> g_time_now_from_system_time_function{ … };
std::atomic<TimeTicksNowFunction> g_time_ticks_now_function{ … };
std::atomic<LiveTicksNowFunction> g_live_ticks_now_function{ … };
std::atomic<ThreadTicksNowFunction> g_thread_ticks_now_function{ … };
}
TimeDelta TimeDelta::CeilToMultiple(TimeDelta interval) const { … }
TimeDelta TimeDelta::FloorToMultiple(TimeDelta interval) const { … }
TimeDelta TimeDelta::RoundToMultiple(TimeDelta interval) const { … }
std::ostream& operator<<(std::ostream& os, TimeDelta time_delta) { … }
Time Time::Now() { … }
Time Time::NowFromSystemTime() { … }
Time Time::Midnight(bool is_local) const { … }
bool Time::FromStringInternal(const char* time_string,
bool is_local,
Time* parsed_time) { … }
bool Time::ExplodedMostlyEquals(const Exploded& lhs, const Exploded& rhs) { … }
bool Time::FromMillisecondsSinceUnixEpoch(int64_t unix_milliseconds,
Time* time) { … }
int64_t Time::ToRoundedDownMillisecondsSinceUnixEpoch() const { … }
std::ostream& operator<<(std::ostream& os, Time time) { … }
TimeTicks TimeTicks::Now() { … }
void TimeTicks::SetSharedUnixEpoch(TimeTicks ticks_at_epoch) { … }
TimeTicks TimeTicks::UnixEpoch() { … }
TimeTicks TimeTicks::SnappedToNextTick(TimeTicks tick_phase,
TimeDelta tick_interval) const { … }
std::ostream& operator<<(std::ostream& os, TimeTicks time_ticks) { … }
LiveTicks LiveTicks::Now() { … }
#if !BUILDFLAG(IS_WIN)
namespace subtle {
LiveTicks LiveTicksNowIgnoringOverride() { … }
}
#endif
std::ostream& operator<<(std::ostream& os, LiveTicks live_ticks) { … }
ThreadTicks ThreadTicks::Now() { … }
std::ostream& operator<<(std::ostream& os, ThreadTicks thread_ticks) { … }
bool Time::Exploded::HasValidValues() const { … }
}