public interface TimeMXBean
getJVMStartTimeMillis
is
convertible using java.util.Date
to the wall clock time
when the Zing virtual machine was started.
ObjectName
: com.azul.zing:type=Time
Modifier and Type | Method and Description |
---|---|
java.lang.String |
convertElapsedTimeSinceJVMStartSecToDateTimeString(double timeSec)
Returns a Date-Time String representing the date and time of the
elapsed time since the JVM start in seconds.
|
double |
getElapsedTimeSinceJVMStartSec()
Returns elapsed time since the launch of the Zing virtual machine.
|
java.lang.String |
getUnixTimeOfJVMStartAsDateTimeString()
Returns a Date-Time String representing the Unix (or Epoch or Posix) time
in milliseconds when the Zing virtual machine was started represented as
the number of milliseconds between midnight, January 1, 1970 UTC and
the start of the Zing virtual machine.
|
long |
getUnixTimeOfJVMStartMillis()
Returns the Unix (or Epoch or Posix) time in milliseconds when the
Zing virtual machine was started represented as the number of
milliseconds between the start of the Zing virtual machine and
midnight, January 1, 1970 UTC.
|
java.lang.String |
getVersion()
Version of the TimeMXBean application programming interface.
|
boolean |
setFormatForDateTimeString(java.lang.String formatString)
Sets the format for the formatted date string returned from
getUnixTimeOfJVMStartAsString() and
convertElapsedTimeSinceJVMStartSecToDateTimeString(double timeSec) . |
boolean |
setFormatForDateTimeStringToDefaultValue()
Sets to the default value the format for the formatted date string
returned from
getUnixTimeOfJVMStartAsString() and
convertElapsedTimeSinceJVMStartSecToDateTimeString(double timeSec) . |
java.lang.String convertElapsedTimeSinceJVMStartSecToDateTimeString(double timeSec)
timeSec
- the time, most frequently returned in a query or from
getElapsedTimeSinceJVMStartSec()
."EEE MMM dd HH:mm:ss.SSS zzz yyyy"which, as an example, will print:
Wed Aug 06 14:10:54.105 PDT 2014Use
setFormatForDateTimeString(String formatString)
to override the default Date-Time format.double getElapsedTimeSinceJVMStartSec()
java.lang.String getUnixTimeOfJVMStartAsDateTimeString()
"EEE MMM dd HH:mm:ss.SSS zzz yyyy" which, as an example, will print: Wed Aug 06 14:10:54.105 PDT 2014Use
setFormatForDateTimeString(String formatString)
to override the default Date-Time format.long getUnixTimeOfJVMStartMillis()
java.util.Date
. Or, you can call
getUnixTimeOfJVMStartAsDateTimeString()
to return
a formatted Date-Time String.java.lang.String getVersion()
Version of the TimeMXBean application programming interface. The format for the version is majorVersion.minorVersion.microVersion.
boolean setFormatForDateTimeString(java.lang.String formatString)
getUnixTimeOfJVMStartAsString()
and
convertElapsedTimeSinceJVMStartSecToDateTimeString(double timeSec)
.
See the Javadoc for java.text.SimpleDateFormat for a description about
how to use date and time pattern strings to specify a date and time format.
The default for the format string is:
"EEE MMM dd HH:mm:ss.SSS zzz yyyy"which, for example will print:
Wed Aug 06 14:10:54.105 PDT 2014
formatString
- that represents the format to be used for formatting
the conversion of any millisecond value representing the Unix
(or Epoch or Posix) time.java.lang.SecurityException
- if caller does not have
ManagementPermission("control")
.boolean setFormatForDateTimeStringToDefaultValue()
getUnixTimeOfJVMStartAsString()
and
convertElapsedTimeSinceJVMStartSecToDateTimeString(double timeSec)
.
The default value for the format string is:
"EEE MMM dd HH:mm:ss.SSS zzz yyyy"which, for example will print:
Wed Aug 06 14:10:54.105 PDT 2014
java.lang.SecurityException
- if caller does not have
ManagementPermission("control")
. Submit a bug or feature request
Copyright © 2015-2017, Azul Systems, Inc. All rights reserved.
Azul Systems and Zing are registered trademarks of Azul Systems, Inc.