From 7fe9da98d5f13fc8a3f73c75e34f931732511e5b Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sun, 14 Apr 2019 20:23:17 +0100 Subject: Print out local time --- src/VeriFuzz/Sim/Internal.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/VeriFuzz/Sim') diff --git a/src/VeriFuzz/Sim/Internal.hs b/src/VeriFuzz/Sim/Internal.hs index 145042a..4bfd5e9 100644 --- a/src/VeriFuzz/Sim/Internal.hs +++ b/src/VeriFuzz/Sim/Internal.hs @@ -34,9 +34,11 @@ import Data.ByteString (ByteString) import qualified Data.ByteString as B import Data.Text (Text) import qualified Data.Text as T +import Data.Time.LocalTime (getZonedTime) import Prelude hiding (FilePath) import Shelly import System.FilePath.Posix (takeBaseName) +import VeriFuzz.Internal import VeriFuzz.Verilog.AST -- | Tool class. @@ -102,8 +104,9 @@ noPrint = print_stdout False . print_stderr False echoP :: Text -> Sh () echoP t = do - fn <- pwd - echo $ bname fn <> " - " <> t + fn <- pwd + currentTime <- liftIO getZonedTime + echo $ bname fn <> " [" <> showT currentTime <> "] - " <> t where bname = T.pack . takeBaseName . T.unpack . toTextIgnore logger :: FilePath -> Text -> Sh a -> Sh a -- cgit