From 0861a1e57931a8ae9f12bfd3013c23d4453e4caf Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 13 Jan 2020 12:01:39 +1000 Subject: [PATCH] Common: Remove unused type declarations --- src/common/types.h | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/src/common/types.h b/src/common/types.h index ab2711fa4..02657135d 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -69,47 +69,6 @@ struct dependent_int_false : std::false_type { }; -// Use a signed number for cycle counting -using CycleCount = int64_t; - -// Use int64 for time tracking -using SimulationTime = int64_t; - -// Helpers for simulation time. -ALWAYS_INLINE constexpr SimulationTime SecondsToSimulationTime(SimulationTime s) -{ - return s * INT64_C(1000000000); -} -ALWAYS_INLINE constexpr SimulationTime MillisecondsToSimulationTime(SimulationTime ms) -{ - return ms * INT64_C(1000000); -} -ALWAYS_INLINE constexpr SimulationTime MicrosecondsToSimulationTime(SimulationTime us) -{ - return us * INT64_C(1000); -} -ALWAYS_INLINE constexpr SimulationTime SimulationTimeToSeconds(SimulationTime s) -{ - return s / INT64_C(1000000000); -} -ALWAYS_INLINE constexpr SimulationTime SimulationTimeToMilliseconds(SimulationTime ms) -{ - return ms / INT64_C(1000000); -} -ALWAYS_INLINE constexpr SimulationTime SimulationTimeToMicroseconds(SimulationTime us) -{ - return us / INT64_C(1000); -} - -// Calculates the difference between the specified timestamps, accounting for signed overflow. -ALWAYS_INLINE constexpr SimulationTime GetSimulationTimeDifference(SimulationTime prev, SimulationTime now) -{ - if (prev <= now) - return now - prev; - else - return (std::numeric_limits::max() - prev) + now; -} - // Zero-extending helper template ALWAYS_INLINE constexpr TReturn ZeroExtend(TValue value)