Represents a duration in time, with seconds and nanoseconds resolution.
This class is used to avoid compatibility issues with Duration on older
Android versions.
Inherited Constant Summary
Field Summary
| public static final Creator<PlayDuration> | CREATOR |
Public Constructor Summary
|
PlayDuration(long seconds, int nanos)
Constructs a new
PlayDuration with the given seconds and nanoseconds.
|
Public Method Summary
| boolean | |
| int |
getNanos()
Returns the number of nanoseconds in this duration.
|
| long |
getSeconds()
Returns the number of seconds in this duration.
|
| int |
hashCode()
|
| String |
toString()
|
| void |
writeToParcel(Parcel dest, int
flags)
|
Inherited Method Summary
Fields
public static final Creator<PlayDuration> CREATOR
Public Constructors
public PlayDuration (long seconds, int nanos)
Constructs a new PlayDuration
with the given seconds and nanoseconds.
Parameters
| seconds | The number of seconds in the duration. |
|---|---|
| nanos | The number of nanoseconds in the duration (0 to 999,999,999). |
Public Methods
public boolean equals (Object o)
public int getNanos ()
Returns the number of nanoseconds in this duration.
public long getSeconds ()
Returns the number of seconds in this duration.