## org.jboss.netty.util
Interface Timer

All Known Implementing Classes:
  HashedWheelTimer

    public interface Timer

Schedules `TimerTask`s for one-time future execution in a background thread.

Version:
  $Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
Author:
  The Netty Project, Trustin Lee

Method Summary
`Timeout` `newTimeout(TimerTask task, long delay, TimeUnit unit)` Schedules the specified `TimerTask` for one-time execution after the specified delay.
`Set<Timeout>` `stop()` Releases all resources acquired by this `Timer` and cancels all tasks which were scheduled but not executed yet.

Method Detail

### newTimeout

    Timeout newTimeout(TimerTask task,
                       long delay,
                       TimeUnit unit)

  Schedules the specified `TimerTask` for one-time execution after the specified delay.

  Returns:
    a handle which is associated with the specified task
  Throws:
    `IllegalStateException` - if this timer has been stopped already

### stop

    Set<Timeout> stop()

  Releases all resources acquired by this `Timer` and cancels all tasks which were scheduled but not executed yet.

  Returns:
    the handles associated with the tasks which were canceled by this method

Copyright © 2008-2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.