Search Results for

    Show / Hide Table of Contents

    Struct TimeSpan

    Represents the difference between two dates and times.

    Assembly: FlaxEngine.dll
    File: Engine/Core/Types/TimeSpan.h
    Syntax
    public struct TimeSpan

    Constructors

    TimeSpan()

    Empty constructor.

    Declaration
    public TimeSpan()

    TimeSpan(int32 days, int32 hours, int32 minutes)

    Initializes a new instance of the TimeSpan struct.

    Declaration
    public TimeSpan(int32 days, int32 hours, int32 minutes)
    Parameters
    int32 days

    Amount of days.

    int32 hours

    Amount of hours.

    int32 minutes

    Amount of minutes.

    TimeSpan(int32 days, int32 hours, int32 minutes, int32 seconds)

    Initializes a new instance of the TimeSpan struct.

    Declaration
    public TimeSpan(int32 days, int32 hours, int32 minutes, int32 seconds)
    Parameters
    int32 days

    Amount of days.

    int32 hours

    Amount of hours.

    int32 minutes

    Amount of minutes.

    int32 seconds

    Amount of seconds.

    TimeSpan(int32 days, int32 hours, int32 minutes, int32 seconds, int32 milliseconds)

    Initializes a new instance of the TimeSpan struct.

    Declaration
    public TimeSpan(int32 days, int32 hours, int32 minutes, int32 seconds, int32 milliseconds)
    Parameters
    int32 days

    Amount of days.

    int32 hours

    Amount of hours.

    int32 minutes

    Amount of minutes.

    int32 seconds

    Amount of seconds.

    int32 milliseconds

    Amount of milliseconds

    TimeSpan(int64 ticks)

    Initializes a new instance of the TimeSpan struct.

    Declaration
    public TimeSpan(int64 ticks)
    Parameters
    int64 ticks

    The ticks in 100 nanoseconds resolution.

    Fields

    Ticks

    Time span in 100 nanoseconds resolution.

    Declaration
    public int64 Ticks
    Field Value
    int64

    TicksPerDay

    Declaration
    public static constexpr int64 TicksPerDay = 864000000000
    Field Value
    constexpr int64

    TicksPerHour

    Declaration
    public static constexpr int64 TicksPerHour = 36000000000
    Field Value
    constexpr int64

    TicksPerMillisecond

    Declaration
    public static constexpr int64 TicksPerMillisecond = 10000
    Field Value
    constexpr int64

    TicksPerMinute

    Declaration
    public static constexpr int64 TicksPerMinute = 600000000
    Field Value
    constexpr int64

    TicksPerSecond

    Declaration
    public static constexpr int64 TicksPerSecond = 10000000
    Field Value
    constexpr int64

    TicksPerWeek

    Declaration
    public static constexpr int64 TicksPerWeek = 6048000000000
    Field Value
    constexpr int64

    Methods

    FromDays(double days)

    Creates a time span that represents the specified number of days.

    Declaration
    public static TimeSpan FromDays(double days)
    Parameters
    double days

    The number of days.

    Returns
    TimeSpan

    The time span.

    FromHours(double hours)

    Creates a time span that represents the specified number of hours.

    Declaration
    public static TimeSpan FromHours(double hours)
    Parameters
    double hours

    The number of hours.

    Returns
    TimeSpan

    The time span.

    FromMilliseconds(double milliseconds)

    Creates a time span that represents the specified number of milliseconds.

    Declaration
    public static TimeSpan FromMilliseconds(double milliseconds)
    Parameters
    double milliseconds

    The number of milliseconds.

    Returns
    TimeSpan

    The time span.

    FromMinutes(double minutes)

    Creates a time span that represents the specified number of minutes.

    Declaration
    public static TimeSpan FromMinutes(double minutes)
    Parameters
    double minutes

    The number of minutes.

    Returns
    TimeSpan

    The time span.

    FromSeconds(double seconds)

    Creates a time span that represents the specified number of seconds.

    Declaration
    public static TimeSpan FromSeconds(double seconds)
    Parameters
    double seconds

    The number of seconds.

    Returns
    TimeSpan

    The time span.

    GetDays()

    Gets the days component of this time span.

    Declaration
    public int32 GetDays() const
    Returns
    int32

    GetDuration()

    Returns a time span with the absolute value of this time span.

    Declaration
    public TimeSpan GetDuration() const
    Returns
    TimeSpan

    GetHours()

    Gets the hours component of this time span.

    Declaration
    public int32 GetHours() const
    Returns
    int32

    GetMilliseconds()

    Gets the milliseconds component of this time span.

    Declaration
    public int32 GetMilliseconds() const
    Returns
    int32

    GetMinutes()

    Gets the minutes component of this time span.

    Declaration
    public int32 GetMinutes() const
    Returns
    int32

    GetSeconds()

    Gets the seconds component of this time span.

    Declaration
    public int32 GetSeconds() const
    Returns
    int32

    GetTotalDays()

    Gets the total number of days represented by this time span.

    Declaration
    public double GetTotalDays() const
    Returns
    double

    GetTotalHours()

    Gets the total number of hours represented by this time span.

    Declaration
    public double GetTotalHours() const
    Returns
    double

    GetTotalMilliseconds()

    Gets the total number of milliseconds represented by this time span.

    Declaration
    public double GetTotalMilliseconds() const
    Returns
    double

    GetTotalMinutes()

    Gets the total number of minutes represented by this time span.

    Declaration
    public double GetTotalMinutes() const
    Returns
    double

    GetTotalSeconds()

    Gets the total number of seconds represented by this time span

    Declaration
    public float GetTotalSeconds() const
    Returns
    float

    MaxValue()

    Returns the maximum time span value.

    Declaration
    public static TimeSpan MaxValue()
    Returns
    TimeSpan

    MinValue()

    Returns the minimum time span value.

    Declaration
    public static TimeSpan MinValue()
    Returns
    TimeSpan

    operator!=(const TimeSpan& other)

    Declaration
    public bool operator!=(const TimeSpan& other) const
    Parameters
    TimeSpan other

    Returns
    bool

    operator-()

    Declaration
    public TimeSpan operator-() const
    Returns
    TimeSpan

    operator-(const TimeSpan& other)

    Declaration
    public TimeSpan operator-(const TimeSpan& other) const
    Parameters
    TimeSpan other

    Returns
    TimeSpan

    operator*(float scalar)

    Declaration
    public TimeSpan operator*(float scalar) const
    Parameters
    float scalar

    Returns
    TimeSpan

    operator*=(float scalar)

    Declaration
    public TimeSpan operator*=(float scalar)
    Parameters
    float scalar

    Returns
    TimeSpan

    operator+(const TimeSpan& other)

    Declaration
    public TimeSpan operator+(const TimeSpan& other) const
    Parameters
    TimeSpan other

    Returns
    TimeSpan

    operator+=(const TimeSpan& other)

    Declaration
    public TimeSpan operator+=(const TimeSpan& other)
    Parameters
    TimeSpan other

    Returns
    TimeSpan

    operator<(const TimeSpan& other)

    Declaration
    public bool operator<(const TimeSpan& other) const
    Parameters
    TimeSpan other

    Returns
    bool

    operator<=(const TimeSpan& other)

    Declaration
    public bool operator<=(const TimeSpan& other) const
    Parameters
    TimeSpan other

    Returns
    bool

    operator-=(const TimeSpan& other)

    Declaration
    public TimeSpan operator-=(const TimeSpan& other)
    Parameters
    TimeSpan other

    Returns
    TimeSpan

    operator==(const TimeSpan& other)

    Declaration
    public bool operator==(const TimeSpan& other) const
    Parameters
    TimeSpan other

    Returns
    bool

    operator>(const TimeSpan& other)

    Declaration
    public bool operator>(const TimeSpan& other) const
    Parameters
    TimeSpan other

    Returns
    bool

    operator>=(const TimeSpan& other)

    Declaration
    public bool operator>=(const TimeSpan& other) const
    Parameters
    TimeSpan other

    Returns
    bool

    ToString()

    Declaration
    public String ToString() const
    Returns
    String

    ToString(const char option)

    Declaration
    public String ToString(const char option) const
    Parameters
    char option

    Returns
    String

    Zero()

    Returns the zero time span value.

    Declaration
    public static TimeSpan Zero()
    Returns
    TimeSpan

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat