com.sun.jaw.snmp.manager
Class Timestamp

java.lang.Object
  |
  +--com.sun.jaw.snmp.manager.Timestamp

public final class Timestamp
extends java.lang.Object
implements java.io.Serializable

This class is used to represent a time stamp.

See Also:
Serialized Form

Constructor Summary
Timestamp()
          The default constructor.
Timestamp(long uptime)
          Creates a TimeStamp object using the user parameter.
Timestamp(long uptime, long when)
          Creates a TimeStamp object using the user parameters.
 
Method Summary
 java.util.Date getDate()
          Gets the current date.
 long getDateTime()
          Gets the current date.
 long getSysUpTime()
          Gets the time (in hundreds of a second) since the network management portion of the system was last re-initialized.
 SnmpTimeticks getTimeTicks()
          Gets the SnmpTimeticks object corresponding to the TimeStamp object.
 java.lang.String toString()
          Returns a String representation of the TimeStamp object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Timestamp

public Timestamp()
The default constructor. Sysuptime is 0. This just indicates when this object was created.

Timestamp

public Timestamp(long uptime,
                 long when)
Creates a TimeStamp object using the user parameters.
Parameters:
uptime - The time (in hundreds of a second) since the network management portion of the system was last re-initialized.
when - The current time.

Timestamp

public Timestamp(long uptime)
Creates a TimeStamp object using the user parameter.
Parameters:
uptime - The time (in hundreds of a second) since the network management portion of the system was last re-initialized.
Method Detail

getTimeTicks

public final SnmpTimeticks getTimeTicks()
Gets the SnmpTimeticks object corresponding to the TimeStamp object.
Returns:
The SnmpTimeticks object.

getSysUpTime

public final long getSysUpTime()
Gets the time (in hundreds of a second) since the network management portion of the system was last re-initialized.
Returns:
The sysUpTime.

getDate

public final java.util.Date getDate()
Gets the current date.
Returns:
A Date object representing the current date.

getDateTime

public final long getDateTime()
Gets the current date.
Returns:
A long representing the current date.

toString

public final java.lang.String toString()
Returns a String representation of the TimeStamp object.
Returns:
A String representation of the TimeStamp object.
Overrides:
toString in class java.lang.Object