FileDocCategorySizeDatePackage
Time.javaAPI DocApache Tomcat 6.0.142380Fri Jul 20 04:20:34 BST 2007org.apache.tomcat.jni

Time

public class Time extends Object
Time
author
Mladen Turk
version
$Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $

Fields Summary
public static final long
APR_USEC_PER_SEC
number of microseconds per second
public static final long
APR_MSEC_PER_USEC
number of miliseconds per microsecond
Constructors Summary
Methods Summary
public static native java.lang.Stringctime(long t)
Formats dates in the ctime() format in an efficient manner. Unlike ANSI/ISO C ctime(), apr_ctime() does not include a \n at the end of the string.

param
t the time to convert

public static longmsec(long t)

return
apr_time_t as a msec

        return t / APR_MSEC_PER_USEC;
    
public static native longnow()
number of microseconds since 00:00:00 january 1, 1970 UTC

return
the current time

public static native java.lang.Stringrfc822(long t)
Formats dates in the RFC822 format in an efficient manner.

param
t the time to convert

public static longsec(long t)

return
apr_time_t as a second


          
        
    
        return t / APR_USEC_PER_SEC;
    
public static native voidsleep(long t)
Sleep for the specified number of micro-seconds.
Warning : May sleep for longer than the specified time.

param
t desired amount of time to sleep.