How to generate time based UUIDs?

I want to generate time-based universally unique identifier (UUID) in Java.

The method java.util.UUID.randomUUID() generates a UUID Version 4 where 122 of the 128 bits are from a cryptographically-strong random number generator.

How to generate a Version 1 (time based) UUID ? Is there a separate library for that or is it some how provided in the Java 7 API and I am missing it.


FasterXML Java Uuid Generator (JUG)

https://github.com/cowtowncoder/java-uuid-generator

UUID uuid = Generators.timeBasedGenerator().generate();

String timeuuid = com.datastax.driver.core.utils.UUIDs.timeBased().toString();

have a look at https://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/utils/UUIDs.html