Browse Source

Added timing to main app task

master
Rohan Sircar 7 months ago
parent
commit
ffeb4b1eb4
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      src/main/scala/nova/monadic_sfx/SFXActors.scala

+ 5
- 2
src/main/scala/nova/monadic_sfx/SFXActors.scala View File

@ -75,14 +75,17 @@ object ScalaFXHelloWorld extends JFXApp with MainModule {
}
// _ <- fib1.join
} yield ()
application.runToFuture
application.timed.runToFuture
.onComplete(res =>
res match {
case Failure(exception) => {
println("Application start failed. Reason -")
exception.printStackTrace()
}
case Success(value) => println("Application started Successfully")
case Success((duration, _)) =>
println(
s"Application started successfully in ${duration.toSeconds} seconds"
)
}
)

Loading…
Cancel
Save