50 constexpr Time() =
default;
56 template <
typename Rep,
typename Period>
57 constexpr Time(
const std::chrono::duration<Rep, Period>& duration);
95 [[nodiscard]]
constexpr std::chrono::microseconds
toDuration()
const;
103 template <
typename Rep,
typename Period>
104 constexpr operator std::chrono::duration<Rep, Period>()
const;
120 std::chrono::microseconds m_microseconds{};
451#include <SFML/System/Time.inl>
constexpr Time operator-(Time right)
Overload of unary - operator to negate a time value.
constexpr float asSeconds() const
Return the time value as a number of seconds.
constexpr Time operator%(Time left, Time right)
Overload of binary % operator to compute remainder of a time value.
constexpr Time & operator*=(Time &left, std::int64_t right)
Overload of binary *= operator to scale/assign a time value.
constexpr Time microseconds(std::int64_t amount)
Construct a time value from a number of microseconds.
friend constexpr Time microseconds(std::int64_t)
constexpr Time(const std::chrono::duration< Rep, Period > &duration)
Construct from std::chrono::duration.
constexpr Time operator-(Time left, Time right)
Overload of binary - operator to subtract two time values.
constexpr Time operator*(Time left, std::int64_t right)
Overload of binary * operator to scale a time value.
constexpr Time & operator%=(Time &left, Time right)
Overload of binary %= operator to compute/assign remainder of a time value.
constexpr Time seconds(float amount)
Construct a time value from a number of seconds.
constexpr Time operator*(std::int64_t left, Time right)
Overload of binary * operator to scale a time value.
constexpr float operator/(Time left, Time right)
Overload of binary / operator to compute the ratio of two time values.
constexpr bool operator!=(Time left, Time right)
Overload of != operator to compare two time values.
constexpr std::int64_t asMicroseconds() const
Return the time value as a number of microseconds.
constexpr std::chrono::microseconds toDuration() const
Return the time value as a std::chorono::duration.
constexpr Time operator/(Time left, std::int64_t right)
Overload of binary / operator to scale a time value.
static const Time Zero
Predefined "zero" time value.
Definition Time.hpp:110
constexpr bool operator>(Time left, Time right)
Overload of > operator to compare two time values.
constexpr std::int32_t asMilliseconds() const
Return the time value as a number of milliseconds.
constexpr Time operator+(Time left, Time right)
Overload of binary + operator to add two time values.
constexpr Time operator*(Time left, float right)
Overload of binary * operator to scale a time value.
constexpr bool operator<(Time left, Time right)
Overload of < operator to compare two time values.
constexpr Time & operator-=(Time &left, Time right)
Overload of binary -= operator to subtract/assign two time values.
constexpr bool operator<=(Time left, Time right)
Overload of <= operator to compare two time values.
constexpr Time & operator*=(Time &left, float right)
Overload of binary *= operator to scale/assign a time value.
constexpr Time()=default
Default constructor.
constexpr Time milliseconds(std::int32_t amount)
Construct a time value from a number of milliseconds.
friend constexpr Time seconds(float)
constexpr bool operator==(Time left, Time right)
Overload of == operator to compare two time values.
constexpr Time operator*(float left, Time right)
Overload of binary * operator to scale a time value.
friend constexpr Time milliseconds(std::int32_t)
constexpr Time operator/(Time left, float right)
Overload of binary / operator to scale a time value.
constexpr bool operator>=(Time left, Time right)
Overload of >= operator to compare two time values.
constexpr Time & operator/=(Time &left, std::int64_t right)
Overload of binary /= operator to scale/assign a time value.
constexpr Time & operator/=(Time &left, float right)
Overload of binary /= operator to scale/assign a time value.
constexpr Time & operator+=(Time &left, Time right)
Overload of binary += operator to add/assign two time values.
Definition BlendMode.hpp:34