Android
java.util
public abstract class

java.util.TimerTask

java.lang.Object
java.util.TimerTask Runnable

The TimerTask class is represents a task to run at specified time. The task may be run once or repeatedly.

See Also

Summary

Protected Constructors

            TimerTask()

Public Methods

          boolean  cancel()
Cancels the Task and removes it from the Timer's queue.
abstract          void  run()
The task to run should be specified in the implementation of the run() method.
          long  scheduledExecutionTime()
Returns the scheduled execution time.
Methods inherited from class java.lang.Object
Methods inherited from interface java.lang.Runnable

Details

Protected Constructors

protected TimerTask()

Public Methods

public boolean cancel()

Cancels the Task and removes it from the Timer's queue. Generally, it returns false if the call did not prevent a TimerTask from running at least once. Subsequent calls have no effect.

Returns

  • true if the call prevented a scheduled execution from taking place, false otherwise.

public abstract void run()

The task to run should be specified in the implementation of the run() method.

public long scheduledExecutionTime()

Returns the scheduled execution time. If the task execution is in progress returns the execution time of ongoing task. Tasks which have not yet run return an undefined value.

Returns

  • the most recent execution time.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56