class_docstr: The standalone Elapsed Time metric.
  
  Instances of this metric keep track of the time elapsed between calls to the
  `update` method. The starting time is set when the `update` method is called
  for the first time. That is, the starting time is *not* taken at the time
  the constructor is invoked.
  
  Calling the `update` method more than twice will update the metric to the
  elapsed time between the first and the last call to `update`.
  
  The result, obtained using the `result` method, is the time, in seconds,
  computed as stated above.
  
  The `reset` method will set the metric to its initial state, thus resetting
  the initial time. This metric in its initial state (or if the `update`
  method was invoked only once) will return an elapsed time of 0.
class_docstr_tok: ["The","standalone","Elapsed","Time","metric",".","Instances","of","this","metric","keep","track","of","the","time","elapsed","between","calls","to","the","`","update","`","method",".","The","starting","time","is","set","when","the","`","update","`","method","is","called","for","the","first","time",".","That","is",",","the","starting","time","is","*","not","*","taken","at","the","time","the","constructor","is","invoked",".","Calling","the","`","update","`","method","more","than","twice","will","update","the","metric","to","the","elapsed","time","between","the","first","and","the","last","call","to","`","update","`",".","The","result",",","obtained","using","the","`","result","`","method",",","is","the","time",",","in","seconds",",","computed","as","stated","above",".","The","`","reset","`","method","will","set","the","metric","to","its","initial","state",",","thus","resetting","the","initial","time",".","This","metric","in","its","initial","state","(","or","if","the","`","update","`","method","was","invoked","only","once",")","will","return","an","elapsed","time","of","0","."]
docstr: Retrieves the elapsed time.
  
  Calling this method will not change the internal state of the metric.
  
  :return: The elapsed time, in seconds, as a float value.
code: def result(self) -> float:
      """
      Retrieves the elapsed time.
  
      Calling this method will not change the internal state of the metric.
  
      :return: The elapsed time, in seconds, as a float value.
      """
      if self._init_time is None:
          return 0.0
      return self._prev_time - self._init_time
  
imports: import time
  from typing import TYPE_CHECKING, List
  from avalanche.evaluation import Metric, PluginMetric, GenericPluginMetric
  from avalanche.evaluation.metric_results import MetricValue, MetricResult
  from avalanche.evaluation.metric_utils import get_metric_name
  from avalanche.evaluation.metrics.mean import Mean
label_desc: Use image node_id 3 for calling the ElapsedTime obj's underlying member method code with example usage: obj.result() and returns: unknown, int