Thanks. Do you mind changing the style to match:
```scala
val duration = s.submissionTime.map { t =>
  if (finishTime > t) finishTime - t else System.currentTimeMillis - t
}
```