microsOfSecond
microsOfSecond returns the number of microseconds that have elapsed since the top of the second.
Syntax
microsOfSecond(instant, timeZone)
microsOfMilli(dateTime)
Parameters
| Parameter | Type | Description |
|---|---|---|
| instant | Instant | The date-time from which to return the elapsed time. |
| timeZone | ZoneId | The time zone. |
| dateTime | ZonedDateTime | The date-time from which to return the elapsed time. |
Returns
The number of microseconds that have elapsed since the start of the second represented by the provided date-time.
Note
Microseconds are rounded, not dropped.
Examples
datetime = parseInstant("2023-09-09T12:34:56.123456 ET")
micros = microsOfSecond(datetime, timeZone("ET"))
println micros