Skip to content

Commit

Permalink
[Internal] Micro-optimisation: Reuse previously calculated `java.lang…
Browse files Browse the repository at this point in the history
….System.nanoTime`
  • Loading branch information
jivanic-demystdata committed Nov 17, 2024
1 parent 1c5041e commit d1af20a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ private[consumer] final class Runloop private (
for {
p <- Promise.make[Throwable, Unit]
startTime = java.lang.System.nanoTime()
_ <- commitQueue.offer(Runloop.Commit(java.lang.System.nanoTime(), offsets, p))
_ <- commitQueue.offer(Runloop.Commit(startTime, offsets, p))
_ <- commandQueue.offer(RunloopCommand.CommitAvailable)
_ <- diagnostics.emit(DiagnosticEvent.Commit.Started(offsets))
_ <- p.await.timeoutFail(CommitTimeout)(commitTimeout)
Expand Down

0 comments on commit d1af20a

Please sign in to comment.