public abstract class

Timer

extends Object
java.lang.Object
   ↳ com.urbanairship.iam.banner.Timer

Class Overview

Timer that can be stopped and started.

Summary

Public Constructors
Timer(long milliseconds)
Creates a new timer.
Public Methods
long getRunTime()
Gets the total run time in milliseconds.
void start()
Starts the timer.
void stop()
Stops the timer.
Protected Methods
abstract void onFinish()
Called when the timer finishes.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Timer (long milliseconds)

Creates a new timer.

Parameters
milliseconds The duration of the timer in milliseconds.

Public Methods

public long getRunTime ()

Gets the total run time in milliseconds.

Returns
  • The total run time in milliseconds.

public void start ()

Starts the timer.

public void stop ()

Stops the timer.

Protected Methods

protected abstract void onFinish ()

Called when the timer finishes.