aboutsummaryrefslogtreecommitdiffstats
path: root/src/VeriFuzz/Sim
diff options
context:
space:
mode:
authorYann Herklotz <git@ymhg.org>2019-04-14 20:23:17 +0100
committerYann Herklotz <git@ymhg.org>2019-04-14 20:23:17 +0100
commit7fe9da98d5f13fc8a3f73c75e34f931732511e5b (patch)
treec3530f66d9ede45b68abdd11e2ec9e2d810f119d /src/VeriFuzz/Sim
parent4caf4003cf3460301709ec6813d71c28456fb5a2 (diff)
downloadverismith-7fe9da98d5f13fc8a3f73c75e34f931732511e5b.tar.gz
verismith-7fe9da98d5f13fc8a3f73c75e34f931732511e5b.zip
Print out local time
Diffstat (limited to 'src/VeriFuzz/Sim')
-rw-r--r--src/VeriFuzz/Sim/Internal.hs7
1 files changed, 5 insertions, 2 deletions
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