From ffeb4b1eb428c35eb7f7c8981da122306f6edc43 Mon Sep 17 00:00:00 2001 From: Rohan Sircar Date: Fri, 28 Aug 2020 14:39:39 +0530 Subject: [PATCH] Added timing to main app task --- src/main/scala/nova/monadic_sfx/SFXActors.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/scala/nova/monadic_sfx/SFXActors.scala b/src/main/scala/nova/monadic_sfx/SFXActors.scala index 54f95c0..3ba3169 100644 --- a/src/main/scala/nova/monadic_sfx/SFXActors.scala +++ b/src/main/scala/nova/monadic_sfx/SFXActors.scala @@ -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" + ) } )