Class InstantKt

  • All Implemented Interfaces:

    
    public final class InstantKt
    
                        
    • Constructor Detail

    • Method Detail

      • toEpochMicro

         final static Long toEpochMicro(Instant $self)

        Converts this instant to the number of microseconds from the epoch of 1970-01-01T00:00:00Z.

        If this instant represents a point on the time-line too far in the future or past to fit in a long microseconds, then an exception is thrown.

        If this instant has greater than microseconds precision, then the conversion will drop any excess precision information as though the amount in nanoseconds was subject to integer division by one thousand.

        Returns:

        the number of microseconds since the epoch of 1970-01-01T00:00:00Z

      • instantOfEpochMicro

         final static Instant instantOfEpochMicro(Long epochMicro)

        Obtains an instance of {@code Instant} using microseconds from the epoch of 1970-01-01T00:00:00Z.

        <p> The seconds and nanoseconds are extracted from the specified microseconds.
        Parameters:
        epochMicro - the number of microseconds from 1970-01-01T00:00:00Z
        Returns:

        an instant, not null