TimeClock.MoonPhase, TimeClock.Season, TimeClock.TidePhase, TimeClock.TimeOfDay, TimeClock.TimePeriod| Modifier and Type | Field | Description | 
|---|---|---|
| protected long | clockCode | |
| protected int[] | dawnToDusk | |
| protected int | day | |
| protected int | dayOfYear | |
| protected int | daysInMonth | |
| protected int | daysInYear | |
| protected int | hoursInDay | |
| protected long | lastTicked | |
| protected boolean | loaded | |
| protected java.lang.String | loadName | |
| protected int | month | |
| protected java.lang.String[] | monthsInYear | |
| protected int | tickStatus | |
| protected int | time | |
| protected java.lang.String[] | weekNames | |
| protected int | weekOfMonth | |
| protected int | weekOfYear | |
| protected int | year | |
| protected java.lang.String[] | yearNames | 
idConverterSTATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET| Constructor | Description | 
|---|---|
| DefaultTimeClock() | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | bump(TimeClock.TimePeriod P,
    int num) | Increase this clocks time by the given number of
 time periods. | 
| void | bumpDays(int num) | Increase this clocks time by the given number of days. | 
| void | bumpHours(int num) | Increase this clocks time by the given number of hours. | 
| void | bumpMonths(int num) | Increase this clocks time by the given number of months. | 
| void | bumpWeeks(int num) | Increase this clocks time by the given number of weeks. | 
| void | bumpYears(int num) | Increase this clocks time by the given number of years. | 
| int | compareTo(CMObject o) | |
| CMObject | copyOf() | Similar to Cloneable.clone(), but does its best to make sure that
 any internal objects to this class are also copyOfed. | 
| TimeClock | deriveClock(long millis) | Using the current time and date as a yardstick, and assuming constant
 running and perfect timing, this method will derive a mud date and time
 from the given real life date/time in milliseconds. | 
| java.lang.String | deriveEllapsedTimeString(long millis) | Using the given number of milliseconds, this method will return a string
 describing the number of mud days, hours, etc that is represented by
 that amount of real time, assuming constant running and perfect timing. | 
| long | deriveMillisAfter(TimeClock C) | This method will discover the difference in mud hours between this time clock
 and the given EARLIER clock, assuming they use the same scale of measurement. | 
| long | deriveMudHoursAfter(TimeClock C) | This method will discover the difference in mud hours between this time clock
 and the given EARLIER clock, assuming they use the same scale of measurement. | 
| TimeClock | fromTimePeriodCodeString(java.lang.String period) | Copies this clock and sets it accord to
 the coded date/time. | 
| int[] | getDawnToDusk() | Gets the dawn to dusk values, indexed by the TOD constants. | 
| int | getDayOfMonth() | Gets the current day of month. | 
| int | getDayOfYear() | Gets the current days of the year. | 
| int | getDaysInMonth() | Gets the days in a month. | 
| int | getDaysInWeek() | Gets the number of days in each week | 
| int | getDaysInYear() | Gets the current days of the year. | 
| int | getHourOfDay() | Gets the current time of day (the hour). | 
| int | getHoursInDay() | Gets the hours in a day. | 
| int | getHoursPer(TimeClock.TimePeriod period) | Given a time period, returns the number of mud hours
 contained in each, based on this clock. | 
| int | getMonth() | Gets the current month. | 
| java.lang.String[] | getMonthNames() | Gets the month names, in order, indexed by 0. | 
| int | getMonthsInSeason() | Returns the number of months in a season. | 
| int | getMonthsInYear() | Gets the months in a year. | 
| TimeClock.MoonPhase | getMoonPhase(Room room) | Gets the moon phase an an enumeration. | 
| long | getPeriodMillis(TimeClock.TimePeriod P) | Given a standard time period, returns this local clocks
 elapsed millis for each period. | 
| TimeClock.Season | getSeasonCode() | Gets the season code. | 
| java.lang.String | getShortestTimeDescription() | Gets the shortest time description, showing only the date and
 time in brief numeric format. | 
| java.lang.String | getShortTimeDescription() | Gets a shorter time description, showing the date and time in
 full sentence format, but skipping lunar orientation. | 
| int | getTickStatus() | A coded status for this object during the period where
 its tick method is being called. | 
| TimeClock.TidePhase | getTidePhase(Room room) | Gets the phase of the tides as an enumeration. | 
| TimeClock.TimeOfDay | getTODCode() | Gets the TOD code, which is the sun-orientation (morning, evening, etc) | 
| java.lang.String[] | getWeekNames() | Gets the week names, which is the names of the days of each week,
 a string array indexed by the day of the week - 1. | 
| int | getWeekOfMonth() | Gets the current week of the month. | 
| int | getWeekOfYear() | Gets the current week of the year. | 
| int | getYear() | Gets the current year. | 
| java.lang.String[] | getYearNames() | Gets the names of the year, an arbitrary sized list that is rotated
 through from year to year. | 
| void | handleTimeChange() | Causes the world to visibly react to a change in time | 
| java.lang.String | ID() | The CoffeeMud Java Class ID shared by all instances of
 this object. | 
| void | initializeClass() | Called ONCE after all objects are loaded, but before the map is read in
 during initialization. | 
| void | initializeINIClock(CMProps page) | Initialize ini clock by reading calendar values from the given
 properties page. | 
| boolean | isAfter(TimeClock C) | Returns whether this time clock represents an
 earlier later than the given one, timezones
 notwithstanding. | 
| boolean | isBefore(TimeClock C) | Returns whether this time clock represents an
 earlier hour than the given one, timezones
 notwithstanding. | 
| boolean | isEqual(TimeClock C) | Returns whether this time clock represents the
 exact same hour as the given one, timezones
 notwithstanding. | 
| java.lang.String | L(java.lang.String str,
 java.lang.String... xs) | |
| java.lang.String | name() | The nice displayable name of this instance of this object | 
| CMObject | newInstance() | Returns a new instance of this class. | 
| void | save() | Saves the current time/date information where ever its supposed
 to be saved. | 
| void | setDawnToDusk(int dawn,
             int day,
             int dusk,
             int night) | Sets the dawn to dusk values as absolute hours when that particular
 time of day begins. | 
| void | setDayOfMonth(int d) | Sets the current day of month. | 
| void | setDaysInMonth(int d) | Sets the days in a month. | 
| void | setDaysInWeek(java.lang.String[] days) | Sets the number of days in each week by naming each of them in a string array | 
| void | setFromHoursSinceEpoc(long num) | Sets this clock to the given number
 of hours since epoc. | 
| boolean | setHourOfDay(int t) | Sets the time of day (the hour). | 
| void | setHoursInDay(int h) | Sets the hours in a day. | 
| void | setLoadName(java.lang.String name) | Sets the name of this time object for the purposes of database loading
 and saving. | 
| void | setMonth(int m) | Sets the current month. | 
| void | setMonthsInYear(java.lang.String[] months) | Sets the months in year as a string array of names, arranged in order. | 
| void | setYear(int y) | Sets the current year. | 
| void | setYearNames(java.lang.String[] years) | Sets the year names, which is an arbitrary sized list that is rotated
 through from year to year. | 
| boolean | tick(Tickable ticking,
    int tickID) | this is the method which is called periodically by the threading engine. | 
| void | tickTock(int howManyHours) | Alters the time/day by the given number of hours (forward
 or backward) | 
| protected void | tickTock(int howManyHours,
        boolean moveTheSky) | |
| java.lang.String | timeDescription(MOB mob,
               Room room) | Returns a complete description of the date, time, and lunar
 orientation, and day of the week in a full sentence word
 format. | 
| long | toHoursSinceEpoc() | Returns the total hours since epoc | 
| java.lang.String | toTimePeriodCodeString() | Returns this clocks date/time, plus a brief
 definition of the scale of the various time periods. | 
| long | toTimestamp(TimeClock now) | Converts this TimeClock to an approximate real-life
 millis since epoc. | 
protected int tickStatus
protected boolean loaded
protected java.lang.String loadName
protected volatile long lastTicked
protected int year
protected int month
protected int day
protected int time
protected int hoursInDay
protected int weekOfMonth
protected int weekOfYear
protected int dayOfYear
protected int daysInYear
protected java.lang.String[] monthsInYear
protected int daysInMonth
protected int[] dawnToDusk
protected java.lang.String[] weekNames
protected java.lang.String[] yearNames
protected long clockCode
public java.lang.String ID()
CMObjectpublic java.lang.String name()
Tickablename in interface CMObjectname in interface TickableEnvironmental.Name()public CMObject newInstance()
CMObjectnewInstance in interface CMObjectpublic void initializeClass()
CMObjectinitializeClass in interface CMObjectpublic int getTickStatus()
TickablegetTickStatus in interface TickableTickable.tick(Tickable, int)public void setLoadName(java.lang.String name)
TimeClocksetLoadName in interface TimeClockname - the new load nameTimeClock.save()public int getHoursInDay()
TimeClockgetHoursInDay in interface TimeClockTimeClock.setHoursInDay(int)public void setHoursInDay(int h)
TimeClocksetHoursInDay in interface TimeClockh - the new hours in a dayTimeClock.getHoursInDay()public int getDaysInMonth()
TimeClockgetDaysInMonth in interface TimeClockTimeClock.setDaysInMonth(int)public void setDaysInMonth(int d)
TimeClocksetDaysInMonth in interface TimeClockd - the new days in a monthTimeClock.getDaysInMonth()public int getMonthsInYear()
TimeClockgetMonthsInYear in interface TimeClockTimeClock.setMonthsInYear(String[]), 
TimeClock.getMonthNames()public java.lang.String[] getMonthNames()
TimeClockgetMonthNames in interface TimeClockTimeClock.setMonthsInYear(String[]), 
TimeClock.getMonthNames()public void setMonthsInYear(java.lang.String[] months)
TimeClocksetMonthsInYear in interface TimeClockmonths - the new month names in a yearTimeClock.getMonthNames(), 
TimeClock.getMonthsInYear()public int getWeekOfMonth()
TimeClockgetWeekOfMonth in interface TimeClockTimeClock.getDaysInWeek()public int getWeekOfYear()
TimeClockgetWeekOfYear in interface TimeClockTimeClock.getDaysInWeek()public int getDayOfYear()
TimeClockgetDayOfYear in interface TimeClockpublic int getDaysInYear()
TimeClockgetDaysInYear in interface TimeClockpublic int[] getDawnToDusk()
TimeClockgetDawnToDusk in interface TimeClockTimeClock.getTODCode(), 
TimeClock.setDawnToDusk(int, int, int, int), 
TimeClock.TimeOfDaypublic java.lang.String[] getYearNames()
TimeClockgetYearNames in interface TimeClockTimeClock.setYearNames(String[])public void setYearNames(java.lang.String[] years)
TimeClocksetYearNames in interface TimeClockyears - the new years namesTimeClock.getYearNames()public void setDawnToDusk(int dawn,
                          int day,
                          int dusk,
                          int night)
TimeClocksetDawnToDusk in interface TimeClockdawn - the dawn hourday - the day hourdusk - the dusk hournight - the night hourTimeClock.getDawnToDusk(), 
TimeClock.getTODCode(), 
TimeClock.TimeOfDaypublic java.lang.String[] getWeekNames()
TimeClockgetWeekNames in interface TimeClockTimeClock.setDaysInWeek(String[]), 
TimeClock.getDaysInWeek()public int getDaysInWeek()
TimeClockgetDaysInWeek in interface TimeClockTimeClock.setDaysInWeek(String[]), 
TimeClock.getWeekNames()public void setDaysInWeek(java.lang.String[] days)
TimeClocksetDaysInWeek in interface TimeClockdays - the new days in each week string arrayTimeClock.getDaysInWeek(), 
TimeClock.getWeekNames()public java.lang.String getShortestTimeDescription()
TimeClockgetShortestTimeDescription in interface TimeClockTimeClock.timeDescription(MOB, Room), 
TimeClock.getShortTimeDescription()public java.lang.String getShortTimeDescription()
TimeClockgetShortTimeDescription in interface TimeClockTimeClock.timeDescription(MOB, Room), 
TimeClock.getShortestTimeDescription()public void initializeINIClock(CMProps page)
TimeClockinitializeINIClock in interface TimeClockpage - the properties pagepublic java.lang.String L(java.lang.String str,
                          java.lang.String... xs)
public java.lang.String timeDescription(MOB mob, Room room)
TimeClocktimeDescription in interface TimeClockmob - the mob who wants to know the timeroom - the room the room where the mob is wanting the timeTimeClock.getShortTimeDescription(), 
TimeClock.getShortestTimeDescription()public int getYear()
TimeClockgetYear in interface TimeClockTimeClock.setYear(int)public void setYear(int y)
TimeClocksetYear in interface TimeClocky - the new yearTimeClock.getYear()public int getMonthsInSeason()
TimeClockgetMonthsInSeason in interface TimeClockpublic TimeClock.Season getSeasonCode()
TimeClockgetSeasonCode in interface TimeClockTimeClock.Seasonpublic int getMonth()
TimeClockgetMonth in interface TimeClockTimeClock.setMonth(int)public void setMonth(int m)
TimeClocksetMonth in interface TimeClockm - the new monthTimeClock.getMonth()public TimeClock.MoonPhase getMoonPhase(Room room)
TimeClockgetMoonPhase in interface TimeClockroom - the room to check the moon phase forTimeClock.MoonPhasepublic TimeClock.TidePhase getTidePhase(Room room)
TimeClockgetTidePhase in interface TimeClockroom - the room to check the tide phase forTimeClock.TidePhasepublic int getDayOfMonth()
TimeClockgetDayOfMonth in interface TimeClockTimeClock.setDayOfMonth(int)public void setDayOfMonth(int d)
TimeClocksetDayOfMonth in interface TimeClockd - the new day of monthTimeClock.getDayOfMonth()public int getHourOfDay()
TimeClockgetHourOfDay in interface TimeClockTimeClock.setHourOfDay(int)public TimeClock.TimeOfDay getTODCode()
TimeClockgetTODCode in interface TimeClockTimeClock.setHourOfDay(int), 
TimeClock.setDawnToDusk(int, int, int, int), 
TimeClock.TimeOfDaypublic boolean setHourOfDay(int t)
TimeClocksetHourOfDay in interface TimeClockt - the time of day (the hour)TimeClock.getHourOfDay()public CMObject copyOf()
CMObjectpublic TimeClock deriveClock(long millis)
TimeClockderiveClock in interface TimeClockmillis - the milliseconds since 1970TimeClock.deriveMillisAfter(TimeClock), 
TimeClock.deriveEllapsedTimeString(long)public long toTimestamp(TimeClock now)
TimeClocktoTimestamp in interface TimeClocknow - TODOpublic java.lang.String deriveEllapsedTimeString(long millis)
TimeClockderiveEllapsedTimeString in interface TimeClockmillis - the milliseconds of elapsed time representedTimeClock.deriveMillisAfter(TimeClock), 
TimeClock.deriveClock(long)public long deriveMillisAfter(TimeClock C)
TimeClockderiveMillisAfter in interface TimeClockC - the earlier time clock objectTimeClock.deriveClock(long), 
TimeClock.deriveEllapsedTimeString(long)public long getPeriodMillis(TimeClock.TimePeriod P)
TimeClockgetPeriodMillis in interface TimeClockP - the TimePeriod to get a duration forpublic boolean isAfter(TimeClock C)
TimeClockpublic boolean isBefore(TimeClock C)
TimeClockpublic boolean isEqual(TimeClock C)
TimeClockisEqual in interface TimeClockC - the clock to compare toTimeClock.isBefore(TimeClock), 
TimeClock.isEqual(TimeClock), 
TimeClock.isAfter(TimeClock)public long deriveMudHoursAfter(TimeClock C)
TimeClockderiveMudHoursAfter in interface TimeClockC - the earlier time clock objectTimeClock.deriveClock(long), 
TimeClock.deriveEllapsedTimeString(long)public void handleTimeChange()
TimeClockhandleTimeChange in interface TimeClockprotected void tickTock(int howManyHours,
                        boolean moveTheSky)
public void tickTock(int howManyHours)
TimeClockpublic void bumpHours(int num)
TimeClockbumpHours in interface TimeClocknum - the number to bumpTimeClock.tickTock(int), 
TimeClock.bumpDays(int), 
TimeClock.bumpWeeks(int), 
TimeClock.bumpMonths(int), 
TimeClock.bumpYears(int), 
TimeClock.bump(TimePeriod, int)public void bumpDays(int num)
TimeClockbumpDays in interface TimeClocknum - the number to bumpTimeClock.tickTock(int), 
TimeClock.bumpHours(int), 
TimeClock.bumpWeeks(int), 
TimeClock.bumpMonths(int), 
TimeClock.bumpYears(int), 
TimeClock.bump(TimePeriod, int)public void bumpWeeks(int num)
TimeClockbumpWeeks in interface TimeClocknum - the number to bumpTimeClock.tickTock(int), 
TimeClock.bumpHours(int), 
TimeClock.bumpDays(int), 
TimeClock.bumpMonths(int), 
TimeClock.bumpYears(int), 
TimeClock.bump(TimePeriod, int)public void bumpMonths(int num)
TimeClockbumpMonths in interface TimeClocknum - the number to bumpTimeClock.tickTock(int), 
TimeClock.bumpHours(int), 
TimeClock.bumpDays(int), 
TimeClock.bumpWeeks(int), 
TimeClock.bumpYears(int), 
TimeClock.bump(TimePeriod, int)public void bumpYears(int num)
TimeClockbumpYears in interface TimeClocknum - the number to bumpTimeClock.tickTock(int), 
TimeClock.bumpHours(int), 
TimeClock.bumpDays(int), 
TimeClock.bumpWeeks(int), 
TimeClock.bumpMonths(int), 
TimeClock.bump(TimePeriod, int)public void bump(TimeClock.TimePeriod P, int num)
TimeClockbump in interface TimeClockP - the time periodnum - the number of periods to bump byTimeClock.tickTock(int), 
TimeClock.bumpHours(int), 
TimeClock.bumpDays(int), 
TimeClock.bumpWeeks(int), 
TimeClock.bumpMonths(int), 
TimeClock.bumpYears(int)public long toHoursSinceEpoc()
TimeClocktoHoursSinceEpoc in interface TimeClockTimeClock.setFromHoursSinceEpoc(long)public void setFromHoursSinceEpoc(long num)
TimeClocksetFromHoursSinceEpoc in interface TimeClocknum - the new time, in hours since epoc.TimeClock.tickTock(int), 
TimeClock.toHoursSinceEpoc()public int getHoursPer(TimeClock.TimePeriod period)
TimeClockgetHoursPer in interface TimeClockperiod - the period you are curious aboutpublic void save()
TimeClocksave in interface TimeClockTimeClock.setLoadName(String)public java.lang.String toTimePeriodCodeString()
TimeClocktoTimePeriodCodeString in interface TimeClockpublic TimeClock fromTimePeriodCodeString(java.lang.String period)
TimeClockfromTimePeriodCodeString in interface TimeClockperiod - the coded timepublic boolean tick(Tickable ticking, int tickID)
Tickabletick in interface Tickableticking - a reference to this Tickable objecttickID - the TICKID_ constant describing this periodic call, as defined in TickableTickable, 
ServiceEngine, 
TickableGroup