Clock class
The Clock class is part of the java.time package and provides an abstraction to access the current instant, date, and time using a time-zone.This abstract an class. It allows applications to: Get the current time in a consistent and testable way. Work with different time zones or offsets. Be used to inject clocks for unit …