com.sksamuel.scam.Stopwatch.scala Maven / Gradle / Ivy
package com.sksamuel.scam
import scala.concurrent.duration._
/** @author Stephen Samuel */
class Stopwatch {
var _start = 0l
var _end = 0l
def start() = {
_start = System.nanoTime()
}
def stop() = {
_end = System.nanoTime()
}
def elapsed: FiniteDuration = (_end - _start).nanos
}