RSTimeUnit

Methods
12
Fields
2

Getting one

RSTimeUnit.valueOf(…)
RSTimeUnit.CLIENT_TICKS
RSTimeUnit.GAME_TICKS

Methods

MethodReturnsDescription
name()stringThe constant's name as declared.
ordinal()numberThe constant's 0-based position in values().
toString()stringThis enum's own text for the constant, which can differ from name(); tostring(c) answers the same.
compareTo(RSTimeUnit)numberThis ordinal less other's.
equals(any)booleanWhether other is this constant. == answers the same.
getDurationMillis()numbergetDurationMillis(): the constant's duration as a number of milliseconds.
getName()stringThis constant's getName() value, listed on each constant.
isDateBased()booleanThis constant's isDateBased() value, listed on each constant.
isDurationEstimated()booleanThis constant's isDurationEstimated() value, listed on each constant.
isTimeBased()booleanThis constant's isTimeBased() value, listed on each constant.
values(){RSTimeUnit}Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.
valueOf(string)RSTimeUnitvalueOf(name): the constant named name; any other name is an error.

Fields

FieldTypeDescription
CLIENT_TICKSRSTimeUnitCLIENT_TICKS: ordinal 0; getDuration() 20 ms, getName() "Client tick", isDateBased() false, isDurationEstimated() false, `isTimeB…
GAME_TICKSRSTimeUnitGAME_TICKS: ordinal 1; getDuration() 600 ms, getName() "Game tick", isDateBased() false, isDurationEstimated() false, `isTimeBase…

Returned by

MethodReturnsDescription
RSTimeUnitClass.valueOfRSTimeUnitvalueOf(name): the constant named name; any other name is an error.
RSTimeUnitClass.values{RSTimeUnit}Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.

Method details

toString

toString: (RSTimeUnit) -> string

This enum's own text for the constant, which can differ from name(); tostring(c) answers the same.

equals

equals: (RSTimeUnit, any) -> boolean

Whether other is this constant. == answers the same.

getName

getName: (RSTimeUnit) -> string

This constant's getName() value, listed on each constant.

isDateBased

isDateBased: (RSTimeUnit) -> boolean

This constant's isDateBased() value, listed on each constant.

isTimeBased

isTimeBased: (RSTimeUnit) -> boolean

This constant's isTimeBased() value, listed on each constant.

values

values: () -> {RSTimeUnit}

Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.

valueOf

valueOf: (string) -> RSTimeUnit

valueOf(name): the constant named name; any other name is an error.

Field details

CLIENT_TICKS

CLIENT_TICKS: RSTimeUnit

CLIENT_TICKS: ordinal 0; getDuration() 20 ms, getName() "Client tick", isDateBased() false, isDurationEstimated() false, isTimeBased() true.

GAME_TICKS

GAME_TICKS: RSTimeUnit

GAME_TICKS: ordinal 1; getDuration() 600 ms, getName() "Game tick", isDateBased() false, isDurationEstimated() false, isTimeBased() true.