Duration.WithSeconds(Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a copy of this duration with the specified amount of seconds.
[Android.Runtime.Register("withSeconds", "(J)Ljava/time/Duration;", "", ApiSince=26)]
public Java.Time.Duration? WithSeconds(long seconds);
[<Android.Runtime.Register("withSeconds", "(J)Ljava/time/Duration;", "", ApiSince=26)>]
member this.WithSeconds : int64 -> Java.Time.Duration
Parameters
- seconds
- Int64
the seconds to represent, may be negative
Returns
a Duration based on this duration with the requested seconds, not null
- Attributes
Remarks
Returns a copy of this duration with the specified amount of seconds. This returns a duration with the specified seconds, retaining the nano-of-second part of this duration. This instance is immutable and unaffected by this method call.
Java reference for java.time.Duration.withSeconds.