src/Tools/jEdit/src/monitor_dockable.scala
changeset 73340 0ffcad1f6130
parent 72147 2375b38a42f8
child 73987 fc363a3b690a
equal deleted inserted replaced
73339:9efdebe24c65 73340:0ffcad1f6130
    27   /* chart data -- owned by GUI thread */
    27   /* chart data -- owned by GUI thread */
    28 
    28 
    29   private var statistics = Queue.empty[Properties.T]
    29   private var statistics = Queue.empty[Properties.T]
    30   private var statistics_length = 0
    30   private var statistics_length = 0
    31 
    31 
    32   private def add_statistics(stats: Properties.T)
    32   private def add_statistics(stats: Properties.T): Unit =
    33   {
    33   {
    34     statistics = statistics.enqueue(stats)
    34     statistics = statistics.enqueue(stats)
    35     statistics_length += 1
    35     statistics_length += 1
    36     limit_data.text match {
    36     limit_data.text match {
    37       case Value.Int(limit) =>
    37       case Value.Int(limit) =>
    40           statistics_length -= 1
    40           statistics_length -= 1
    41         }
    41         }
    42       case _ =>
    42       case _ =>
    43     }
    43     }
    44   }
    44   }
    45   private def clear_statistics()
    45   private def clear_statistics(): Unit =
    46   {
    46   {
    47     statistics = Queue.empty
    47     statistics = Queue.empty
    48     statistics_length = 0
    48     statistics_length = 0
    49   }
    49   }
    50 
    50 
   131       stats =>
   131       stats =>
   132         add_statistics(stats.props)
   132         add_statistics(stats.props)
   133         update_delay.invoke()
   133         update_delay.invoke()
   134     }
   134     }
   135 
   135 
   136   override def init()
   136   override def init(): Unit =
   137   {
   137   {
   138     PIDE.session.runtime_statistics += main
   138     PIDE.session.runtime_statistics += main
   139   }
   139   }
   140 
   140 
   141   override def exit()
   141   override def exit(): Unit =
   142   {
   142   {
   143     PIDE.session.runtime_statistics -= main
   143     PIDE.session.runtime_statistics -= main
   144   }
   144   }
   145 }
   145 }