diffNanos
diffNanos returns the difference in nanoseconds between two date-time values, as an int.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| start | Instant | The start time of the range. |
| start | ZonedDateTime | The start time of the range. |
| end | Instant | The end time of the range. |
| end | ZonedDateTime | The end time of the range. |
Returns
Returns the difference in nanoseconds between the supplied start and end values.
Examples
The following example returns a positive value between two dates.