summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/internal/util/Statistics.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/util/Statistics.scala b/src/reflect/scala/reflect/internal/util/Statistics.scala
index b583137059..905f1bf26e 100644
--- a/src/reflect/scala/reflect/internal/util/Statistics.scala
+++ b/src/reflect/scala/reflect/internal/util/Statistics.scala
@@ -133,6 +133,12 @@ quant)
if (this.value < that.value) -1
else if (this.value > that.value) 1
else 0
+ override def equals(that: Any): Boolean =
+ that match {
+ case that: Counter => (this compare that) == 0
+ case _ => false
+ }
+ override def hashCode = value
override def toString = value.toString
}
@@ -184,6 +190,12 @@ quant)
if (this.specificNanos < that.specificNanos) -1
else if (this.specificNanos > that.specificNanos) 1
else 0
+ override def equals(that: Any): Boolean =
+ that match {
+ case that: StackableTimer => (this compare that) == 0
+ case _ => false
+ }
+ override def hashCode = specificNanos.##
override def toString = s"${super.toString} aggregate, ${show(specificNanos)} specific"
}