name
name: (RSTimeUnit) -> stringThe constant's name as declared.
RSTimeUnit.valueOf(…)
RSTimeUnit.CLIENT_TICKS
RSTimeUnit.GAME_TICKS| Method | Returns | Description |
|---|---|---|
name() | string | The constant's name as declared. |
ordinal() | number | The constant's 0-based position in values(). |
toString() | string | This enum's own text for the constant, which can differ from name(); tostring(c) answers the same. |
compareTo(RSTimeUnit) | number | This ordinal less other's. |
equals(any) | boolean | Whether other is this constant. == answers the same. |
getDurationMillis() | number | getDurationMillis(): the constant's duration as a number of milliseconds. |
getName() | string | This constant's getName() value, listed on each constant. |
isDateBased() | boolean | This constant's isDateBased() value, listed on each constant. |
isDurationEstimated() | boolean | This constant's isDurationEstimated() value, listed on each constant. |
isTimeBased() | boolean | This 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) | RSTimeUnit | valueOf(name): the constant named name; any other name is an error. |
| Field | Type | Description |
|---|---|---|
CLIENT_TICKS | RSTimeUnit | CLIENT_TICKS: ordinal 0; getDuration() 20 ms, getName() "Client tick", isDateBased() false, isDurationEstimated() false, `isTimeB… |
GAME_TICKS | RSTimeUnit | GAME_TICKS: ordinal 1; getDuration() 600 ms, getName() "Game tick", isDateBased() false, isDurationEstimated() false, `isTimeBase… |
| Method | Returns | Description |
|---|---|---|
RSTimeUnitClass.valueOf | RSTimeUnit | valueOf(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. |
namename: (RSTimeUnit) -> stringThe constant's name as declared.
ordinalordinal: (RSTimeUnit) -> numberThe constant's 0-based position in values().
toStringtoString: (RSTimeUnit) -> stringThis enum's own text for the constant, which can differ from name(); tostring(c) answers the same.
compareTocompareTo: (RSTimeUnit, RSTimeUnit) -> numberThis ordinal less other's.
equalsequals: (RSTimeUnit, any) -> booleanWhether other is this constant. == answers the same.
getDurationMillisgetDurationMillis: (RSTimeUnit) -> numbergetDurationMillis(): the constant's duration as a number of milliseconds.
getNamegetName: (RSTimeUnit) -> stringThis constant's getName() value, listed on each constant.
isDateBasedisDateBased: (RSTimeUnit) -> booleanThis constant's isDateBased() value, listed on each constant.
isDurationEstimatedisDurationEstimated: (RSTimeUnit) -> booleanThis constant's isDurationEstimated() value, listed on each constant.
isTimeBasedisTimeBased: (RSTimeUnit) -> booleanThis constant's isTimeBased() value, listed on each constant.
valuesvalues: () -> {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.
valueOfvalueOf: (string) -> RSTimeUnitvalueOf(name): the constant named name; any other name is an error.
CLIENT_TICKSCLIENT_TICKS: RSTimeUnitCLIENT_TICKS: ordinal 0; getDuration() 20 ms, getName() "Client tick", isDateBased() false, isDurationEstimated() false, isTimeBased() true.
GAME_TICKSGAME_TICKS: RSTimeUnitGAME_TICKS: ordinal 1; getDuration() 600 ms, getName() "Game tick", isDateBased() false, isDurationEstimated() false, isTimeBased() true.