monotonic timestamp library

monotonic timestamp.

License

License

GroupId

GroupId

com.zmannotes
ArtifactId

ArtifactId

monotonic-timestamp
Last Version

Last Version

0.0.7
Release Date

Release Date

Type

Type

jar
Description

Description

monotonic timestamp library
monotonic timestamp.
Project URL

Project URL

https://github.com/zman2013/monotonic-timestamp
Source Code Management

Source Code Management

https://github.com/zman2013/monotonic-timestamp

Download monotonic-timestamp

How to add to project

<!-- https://jarcasting.com/artifacts/com.zmannotes/monotonic-timestamp/ -->
<dependency>
    <groupId>com.zmannotes</groupId>
    <artifactId>monotonic-timestamp</artifactId>
    <version>0.0.7</version>
</dependency>
// https://jarcasting.com/artifacts/com.zmannotes/monotonic-timestamp/
implementation 'com.zmannotes:monotonic-timestamp:0.0.7'
// https://jarcasting.com/artifacts/com.zmannotes/monotonic-timestamp/
implementation ("com.zmannotes:monotonic-timestamp:0.0.7")
'com.zmannotes:monotonic-timestamp:jar:0.0.7'
<dependency org="com.zmannotes" name="monotonic-timestamp" rev="0.0.7">
  <artifact name="monotonic-timestamp" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.zmannotes', module='monotonic-timestamp', version='0.0.7')
)
libraryDependencies += "com.zmannotes" % "monotonic-timestamp" % "0.0.7"
[com.zmannotes/monotonic-timestamp "0.0.7"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Travis Build Coverage Status

monotonic-timestamp

Monotonically increasing timestamp.
Since System.currentTimeMillis as ms, if you call it twice quickly, it's possible to get two identical time stamps.
This class fixes the problem!

The Timestamp is so lightweight, you can create one Timestamp instance for each signal source.
But you only has one signal source, just use the static method Timestamp.timestamp() directly.

Timestamp can generate 262144 unique timestamp in one milli-second.
Max valid timestamp: Fri Dec 12 20:41:28 CST 3084

dependency

gradle

implementation "com.zmannotes:monotonic-timestamp:0.0.6"

maven

<dependency>
    <groupId>com.zmannotes</groupId>
    <artifactId>monotonic-timestamp</artifactId>
    <version>0.0.5</version>
</dependency>

How to use

import com.zman.monotonic.timestamp.Timestamp;

...

long uniqueTimestamp = Timestamp.uniq();

Versions

Version
0.0.7
0.0.6