ZIO Clock MILLISECONDS and System.currentTimeMillis
Scala Worksheet import java.util.concurrent.TimeUnit import zio.clock.Clock import zio.console.putStrLn import zio.console.Console import zio.duration.durationInt import zio.{ExitCode, Runtime, ZEnv, ZIO} val prg: ZIO[Console with Clock, Throwable, Int] = for { c <- ZIO.access[Clock](_.get) zio_begin <- c.currentTime(TimeUnit.MILLISECONDS) zio_beginM <- ZIO.accessM[Clock](_.get.currentTime(TimeUnit.MILLISECONDS)) sys_begin <- ZIO.succeed(System.currentTimeMillis) _ <- putStrLn(s" zio_begin = $zio_begin") _ <- putStrLn(s" zio_beginM = $zio_beginM") _ <- putStrLn(s" sys_begin = $sys_begin") _ <- c.sleep(1.second) zio_end <- c.currentTime(TimeUnit.MILLISECONDS) zio_endM <- ZIO.accessM[Clock](_.get.currentTime(TimeUnit.MILLISECONDS)) sys_end <- ZIO.succeed(System.currentTimeMillis) _ <- putStrLn(s" zio_end = $zio_end") _ <- putStrLn(s" zio_endM = $zio_beginM") _ <- putStrL...