Skip to content

Commit

Permalink
code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineThreepwood committed Mar 26, 2024
1 parent 6764115 commit 55e7067
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,11 @@ object TimestampProcessor {
</M> */
@JvmStatic
@Throws(CouldNotPerformException::class)
fun <M : MessageOrBuilder> copyTimestamp(sourceMessageOrBuilder: M, targetMessageOrBuilder: M): M {
return updateTimestamp<M>(
getTimestamp(sourceMessageOrBuilder, TimeUnit.MICROSECONDS),
targetMessageOrBuilder,
TimeUnit.MICROSECONDS
)
}
fun <M : MessageOrBuilder> copyTimestamp(sourceMessageOrBuilder: M, targetMessageOrBuilder: M): M = updateTimestamp(
getTimestamp(sourceMessageOrBuilder, TimeUnit.MICROSECONDS),
targetMessageOrBuilder,
TimeUnit.MICROSECONDS
)

/**
* Method updates the timestamp field of the given message with the current time.
Expand Down

0 comments on commit 55e7067

Please sign in to comment.