Skip to content

Commit 2494498

Browse files
Fix java ID gen
1 parent d603a2b commit 2494498

File tree

1 file changed

+2
-2
lines changed
  • templates/android/library/src/main/java/io/package

1 file changed

+2
-2
lines changed

templates/android/library/src/main/java/io/package/ID.kt.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ class ID {
1111
private fun hexTimestamp(): String {
1212
val now = Instant.now()
1313
val sec = now.epochSecond
14-
val usec = System.nanoTime() / 1000
14+
val usec = (System.nanoTime() / 1000) % 1000
1515

16-
// Convert both parts to hexadecimal format
1716
val hexTimestamp = "%08x%05x".format(sec, usec)
17+
1818
return hexTimestamp
1919
}
2020

0 commit comments

Comments
 (0)