This has an accuracy of milliseconds.
@deprecated Use similar class in com.volantis.openapi.shared.timeinternally this class will calculate in nanosecond resolution only @author silvio
Currently support units are: SECOND, MINUTE, HOUR, DAY
This code was developed by NASA, Goddard Space Flight Center, Code 587 for the Scientist's Expert Assistant (SEA) project for Next Generation Space Telescope (NGST). @version 5.29.99 @author Sandy Grosvenor
TODO: other methods to implement:
Time
class that represents a specific point in time. The underlying representation is a long
value which holds a number of milliseconds since January 1, 1970, 0:00 GMT. To represent a duration of time, such as "6 seconds", use the Duration
class. To represent a time period with a start and end time, use the TimeFrame
class. To represent a time of day, use the TimeOfDay
class.
@author Jonathan Locke
@since 1.2.6
The format is defined by W3C XML Schema Recommendation and ISO8601 i.e hh:mm:ss.sss(Z|(+|-)hh:mm)
Deep support of fractional seconds is not implemented. This implementation only supports fractional second resolution of milliseconds. @author Arnaud Blandin @author Edward Kuns @version $Revision: 7289 $ @see DateTimeBase
Warning: this is an non-standard protocol documented by XEP-0090. Because this is a non-standard protocol, it is subject to change. @author Matt Tucker
This class implements the Comparable interface, where two time objects can be compared in the following way. If any of the two time objects contains an infinite time value, the rules are: a negative infinity is equal to a negative infinity and less than anything else; a positive infinity is equal to a positive infinity and bigger than anything else. If none of the time objects has an infinite time value, the time values of two time objects are compared. If the time values are the same, the two time objects are treated equal, or they represent the same model time. Otherwise, the time object containing a bigger time value is regarded to happen after the time object with a smaller time value.
All time objects share the same time resolution, which is provided by the top-level director. In some domains, such as CT and DE, users can change the time resolution by configuring the timeResolution parameter. The default value for this parameter "1E-10", which has value 10 -10 . To preserve the consistency of time values, timeResolution can not be changed when a model is running (attempting to do so will trigger an exception). @author Haiyang Zheng, Edward A. Lee, Elaine Cheong @version $Id: Time.java,v 1.52 2007/12/07 06:26:47 cxh Exp $ @since Ptolemy II 4.1 @Pt.ProposedRating Yellow (hyzheng) @Pt.AcceptedRating Red (hyzheng)
Rationale: Date is a booby-trapped mess (years that gain and lose 1900 depending on the method?!, mixed zero-indexed and one-indexed properties?!, etc.). {@link GregorianCalendar} isn't too bad, but it is kind of heavyweightfor many uses.
In places, this class uses Calendar - which is always the {@link GregorianCalendar} with GMT (i.e. no daylight savings are applied!)and 24 hour clock (ie. it uses {@link Calendar#HOUR_OF_DAY}). If you need locale-specific calendar support, you should provide this yourself.
Can be sorted - sorts as earliest Time first. @testedby {@link TimeTest} @author daniel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|