org.apache.tomcat.jni

Class Time

public class Time extends Object

Time

Version: $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $

Author: Mladen Turk

Field Summary
static longAPR_MSEC_PER_USEC
number of miliseconds per microsecond
static longAPR_USEC_PER_SEC
number of microseconds per second
Method Summary
static Stringctime(long t)
Formats dates in the ctime() format in an efficient manner.
static longmsec(long t)
static longnow()
number of microseconds since 00:00:00 january 1, 1970 UTC
static Stringrfc822(long t)
Formats dates in the RFC822 format in an efficient manner.
static longsec(long t)
static voidsleep(long t)
Sleep for the specified number of micro-seconds.

Field Detail

APR_MSEC_PER_USEC

public static final long APR_MSEC_PER_USEC
number of miliseconds per microsecond

APR_USEC_PER_SEC

public static final long APR_USEC_PER_SEC
number of microseconds per second

Method Detail

ctime

public static String ctime(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.

Parameters: t the time to convert

msec

public static long msec(long t)

Returns: apr_time_t as a msec

now

public static long now()
number of microseconds since 00:00:00 january 1, 1970 UTC

Returns: the current time

rfc822

public static String rfc822(long t)
Formats dates in the RFC822 format in an efficient manner.

Parameters: t the time to convert

sec

public static long sec(long t)

Returns: apr_time_t as a second

sleep

public static void sleep(long t)
Sleep for the specified number of micro-seconds.
Warning : May sleep for longer than the specified time.

Parameters: t desired amount of time to sleep.

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.