Version: Unity 6 Beta (6000.0)
LanguageEnglish
  • C#

DiscreteTime

struct in Unity.IntegerTime

/

Implemented in:UnityEngine.CoreModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Data-type representing a discrete time value.

Static Properties

MaxValueThe maximum representable time.
MaxValueSecondsThe maximum representable time in seconds.
MinValueThe minimum representable time.
MinValueSecondsThe minimum representable time in seconds.
TickThe duration in seconds of a tick (the smallest representable unit of time).
ZeroThe zero value.

Properties

ValueThe underlying discrete time value, which represents the number of discrete ticks.

Constructors

DiscreteTimeConstructs a discrete time from either seconds (float/double) or ticks (int/long).

Public Methods

ToStringReturns a string representation of the time.

Static Methods

FromTicksExplicitly converts a tick value to a DiscreteTime value.

Operators

operator -Returns the substraction of two time values.
operator !=Returns whether two time values are different.
operator *Returns the multiplication of two time values.
operator /A time value divided by a floating point amount.
operator +Returns the addition of two time values.
operator <Returns whether the left-hand time value is less than the right-hand one.
operator ==Returns true if the time is equal to a given time, false otherwise.
operator >Returns whether left-hand time value is greater than the right-hand one.
RationalTimeConverts a DiscreteTime to a RationalTime representation. This conversion is always lossless.
Unknown operatorReturns whether the left-hand time value is less than or equal to the right-hand one.
Unknown operatorReturns whether the left-hand time value is greater than or equal to the right-hand one.
Unknown operatorReturns the modulus of two time values.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961