NanoClockHelper Class

  • java.lang.Object
    • java.time.Clock
      • com.microsoft.bot.schema.NanoClockHelper

public class NanoClockHelper
extends java.time.Clock

A customized nanoseconds clock providing access to the current instant, date and time using a time-zone.

Constructor Summary

Constructor Description
NanoClockHelper()

Obtains a clock that returns the current instant using the best available system clock with nanoseconds.

NanoClockHelper(Clock clock)

Obtains a clock that returns the current instant using the best available system clock with nanoseconds.

Method Summary

Modifier and Type Method and Description
java.time.ZoneId getZone()
java.time.Instant instant()
java.time.Clock withZone(ZoneId zone)

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Methods inherited from java.time.Clock

java.time.Clock.equals java.time.Clock.fixed java.time.Clock.getZone java.time.Clock.hashCode java.time.Clock.instant java.time.Clock.millis java.time.Clock.offset java.time.Clock.system java.time.Clock.systemDefaultZone java.time.Clock.systemUTC java.time.Clock.tick java.time.Clock.tickMillis java.time.Clock.tickMinutes java.time.Clock.tickSeconds java.time.Clock.withZone

Constructor Details

NanoClockHelper

public NanoClockHelper()

Obtains a clock that returns the current instant using the best available system clock with nanoseconds.

NanoClockHelper

public NanoClockHelper(Clock clock)

Obtains a clock that returns the current instant using the best available system clock with nanoseconds.

Parameters:

clock - A Clock

Method Details

getZone

public ZoneId getZone()

Overrides:

NanoClockHelper.getZone()

instant

public Instant instant()

Overrides:

NanoClockHelper.instant()

withZone

public Clock withZone(ZoneId zone)

Overrides:

NanoClockHelper.withZone(ZoneId zone)

Parameters:

zone

Applies to