You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2013/06/12 07:43:20 UTC

git commit: kafka-938; High CPU usage when more or less idle; patched by Sam Meder; reviewed by Jun Rao

Updated Branches:
  refs/heads/0.8 ddb7947c0 -> 6881bf08f


kafka-938; High CPU usage when more or less idle; patched by Sam Meder; reviewed by Jun Rao


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/6881bf08
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/6881bf08
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/6881bf08

Branch: refs/heads/0.8
Commit: 6881bf08f26ec64c056c6880922c4321679ba92d
Parents: ddb7947
Author: Sam Meder <sa...@gmail.com>
Authored: Tue Jun 11 22:43:41 2013 -0700
Committer: Jun Rao <ju...@gmail.com>
Committed: Tue Jun 11 22:43:41 2013 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/utils/DelayedItem.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/6881bf08/core/src/main/scala/kafka/utils/DelayedItem.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/utils/DelayedItem.scala b/core/src/main/scala/kafka/utils/DelayedItem.scala
index 93c4482..d727649 100644
--- a/core/src/main/scala/kafka/utils/DelayedItem.scala
+++ b/core/src/main/scala/kafka/utils/DelayedItem.scala
@@ -37,7 +37,7 @@ class DelayedItem[T](val item: T, delay: Long, unit: TimeUnit) extends Delayed w
    */
   def getDelay(unit: TimeUnit): Long = {
     val elapsedMs = (SystemTime.milliseconds - createdMs)
-    unit.convert(max(delayMs - elapsedMs, 0), unit)
+    unit.convert(max(delayMs - elapsedMs, 0), TimeUnit.MILLISECONDS)
   }
     
   def compareTo(d: Delayed): Int = {