Skip to content

Commit

Permalink
Rewrite TimetokeUtils.java to kotlin.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-cebo committed Oct 7, 2024
1 parent f54f6fd commit dc5ecb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class TimetokenUtil {
*
* @param timetoken The PubNub timetoken to be converted to a Unix timestamp.
* @return A [Long] representing the Unix timestamp in millis corresponding to the given timetoken.
* @throws IllegalArgumentException if the timetoken does not have 17 digits.
*/
@JvmStatic
fun timetokenToUnix(timetoken: Long): Long {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class TimetokenUtil {
*
* @param timetoken The PubNub timetoken to be converted to a Unix timestamp.
* @return A [Long] representing the Unix timestamp in millis corresponding to the given timetoken.
* @throws IllegalArgumentException if the timetoken does not have 17 digits.
*/
fun timetokenToUnix(timetoken: Long): Long {
if (isLengthDifferentThan17Digits(timetoken)) {
Expand Down

0 comments on commit dc5ecb4

Please sign in to comment.