⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timeutils.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 3 页
字号:
ANOCTOBER</H3><PRE>public static final long <B>ANOCTOBER</B></PRE><DL><DD>The number of milliseconds in the month of October.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#net.jxta.impl.util.TimeUtils.ANOCTOBER">Constant Field Values</A></DL></DL><HR><A NAME="ANOVEMBER"><!-- --></A><H3>ANOVEMBER</H3><PRE>public static final long <B>ANOVEMBER</B></PRE><DL><DD>The number of milliseconds in the month of November.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#net.jxta.impl.util.TimeUtils.ANOVEMBER">Constant Field Values</A></DL></DL><HR><A NAME="ADECEMBER"><!-- --></A><H3>ADECEMBER</H3><PRE>public static final long <B>ADECEMBER</B></PRE><DL><DD>The number of milliseconds in the month of December.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#net.jxta.impl.util.TimeUtils.ADECEMBER">Constant Field Values</A></DL></DL><HR><A NAME="AYEAR"><!-- --></A><H3>AYEAR</H3><PRE>public static final long <B>AYEAR</B></PRE><DL><DD>The number of milliseconds in a non-leap year.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#net.jxta.impl.util.TimeUtils.AYEAR">Constant Field Values</A></DL></DL><HR><A NAME="ALEAPYEAR"><!-- --></A><H3>ALEAPYEAR</H3><PRE>public static final long <B>ALEAPYEAR</B></PRE><DL><DD>The number of milliseconds in a leap year.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#net.jxta.impl.util.TimeUtils.ALEAPYEAR">Constant Field Values</A></DL></DL><HR><A NAME="TIMEWARP"><!-- --></A><H3>TIMEWARP</H3><PRE>static volatile long <B>TIMEWARP</B></PRE><DL><DD>This odd little guy is for use in testing. it is applied anywhere the  current time is used and allows modules which use timeutils to be tested  through long (simulated) periods of time passing.<P><DL></DL></DL><HR><A NAME="WARPBEGAN"><!-- --></A><H3>WARPBEGAN</H3><PRE>static long <B>WARPBEGAN</B></PRE><DL><DD>Absolute time in millis at which we began timewarping.<P><DL></DL></DL><HR><A NAME="WARPFACTOR"><!-- --></A><H3>WARPFACTOR</H3><PRE>static double <B>WARPFACTOR</B></PRE><DL><DD>The rate at which time is warped using the auto-warper.<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="timeNow()"><!-- --></A><H3>timeNow</H3><PRE>public static final long <B>timeNow</B>()</PRE><DL><DD>Return the current time. This value may differ from the value returned by <CODE>System.currentTimeMillis()</CODE> if the <A HREF="../../../../net/jxta/impl/util/TimeUtils.html#timeWarp(long)"><CODE>timeWarp(long)</CODE></A> or <A HREF="../../../../net/jxta/impl/util/TimeUtils.html#autoWarp(double)"><CODE>autoWarp(double)</CODE></A> features are being used. Using <A HREF="../../../../net/jxta/impl/util/TimeUtils.html#timeNow()"><CODE>timeNow()</CODE></A> allows test harnesses to simulate long periods of time passing.<P><DD><DL></DL></DD></DL><HR><A NAME="toAbsoluteTimeMillis(long)"><!-- --></A><H3>toAbsoluteTimeMillis</H3><PRE>public static final long <B>toAbsoluteTimeMillis</B>(long&nbsp;duration)</PRE><DL><DD>Convert a duration into a duration expressed in milliseconds to absolute  time realtive to the current real time. Special handling for the maximum  and minimum durations converts them to the maximum and minimum absolute  times.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>duration</CODE> - a time duration expressed in milliseconds.<DT><B>Returns:</B><DD>an absolute time in milliseconds based on the duration's  relation to the current real time.</DL></DD></DL><HR><A NAME="toAbsoluteTimeMillis(long, long)"><!-- --></A><H3>toAbsoluteTimeMillis</H3><PRE>public static final long <B>toAbsoluteTimeMillis</B>(long&nbsp;duration,                                              long&nbsp;fromWhen)</PRE><DL><DD>Convert a duration into a duration expressed in milliseconds to absolute  time realtive to the provided absolute time. Special handling for the  maximum and minimum durations converts them to the maximum and minimum  absolute times.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>duration</CODE> - a time duration expressed in milliseconds.<DD><CODE>fromWhen</CODE> - an absolute time expressed in milliseconds.<DT><B>Returns:</B><DD>an absolute time in milliseconds based on the duration's  relation to the provided absolute time.</DL></DD></DL><HR><A NAME="toRelativeTimeMillis(long)"><!-- --></A><H3>toRelativeTimeMillis</H3><PRE>public static final long <B>toRelativeTimeMillis</B>(long&nbsp;whence)</PRE><DL><DD>Convert an absolute real time in milliseconds to a duration relative  to the current real time. Special handling for the maximum and minimum  absolute times converts them to the maximum and minimum durations.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>whence</CODE> - an absolute real time expressed in milliseconds.<DT><B>Returns:</B><DD>a duration expressed in milliseconds relative to the current  real time.</DL></DD></DL><HR><A NAME="toRelativeTimeMillis(long, long)"><!-- --></A><H3>toRelativeTimeMillis</H3><PRE>public static final long <B>toRelativeTimeMillis</B>(long&nbsp;whence,                                              long&nbsp;fromWhen)</PRE><DL><DD>Convert an absolute real time in milliseconds to a duration relative  to the current real time. Special handling for the maximum and minimum  absolute times converts them to the maximum and minimum durations.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>whence</CODE> - an absolute real time expressed in milliseconds.<DD><CODE>fromWhen</CODE> - the base time in absolute real time expressed in milliseconds from which the relative time will be calculated.<DT><B>Returns:</B><DD>a duration expressed in milliseconds relative to the provided  absolute time.</DL></DD></DL><HR><A NAME="timeWarp(long)"><!-- --></A><H3>timeWarp</H3><PRE>public static final void <B>timeWarp</B>(long&nbsp;advanceby)</PRE><DL><DD>VM Wide utility for advancing the timewarp by the number of milliseconds specified. May not be used if you are also using <A HREF="../../../../net/jxta/impl/util/TimeUtils.html#autoWarp(double)"><CODE>autoWarp(double)</CODE></A>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>advanceby</CODE> - Advance the timewarp by the number of milliseconds specified.</DL></DD></DL><HR><A NAME="autoWarp(double)"><!-- --></A><H3>autoWarp</H3><PRE>public static final void <B>autoWarp</B>(double&nbsp;warpfactor)</PRE><DL><DD>VM Wide utility for automagically adjusting the time dialation of the time warp.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>warpfactor</CODE> - a decimal ratio at which artifical time will pass.  <ul>      <li>To have time pass at the rate of an hour every minute, initialize      with: <tt>(double)(TimeUtils.ANHOUR / TimeUtils.AMINUTE)</tt>.</li>      <li>To have time pass at five times normal rate, initialize      with: <tt>5.0</tt>.</li>      <li>etc.</li>  </ul></DL></DD></DL><HR><A NAME="warpedRelativeTime(long)"><!-- --></A><H3>warpedRelativeTime</H3><PRE>public static final long <B>warpedRelativeTime</B>(long&nbsp;initial)</PRE><DL><DD>Return a time a relative time adjusted by the current warping factor.  Needed for external methods which do not use <A HREF="../../../../net/jxta/impl/util/TimeUtils.html#timeNow()"><CODE>timeNow()</CODE></A> such  as <CODE>Object.wait(long)</CODE> and  <CODE>Socket.setSoTimeout(int)</CODE>.<P><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TimeUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>JXTA J2SE</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../net/jxta/impl/util/TimerThreadNamer.html" title="class in net.jxta.impl.util"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../net/jxta/impl/util/UnbiasedQueue.html" title="class in net.jxta.impl.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="TimeUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -