Is there a simple method to compute time of function execution in Haskell?
https://github.com/chrissound/FuckItTimer
start' <- start
timerc start' "begin"
print "hello"
timerc start' "after printing hello"
benchmark
timerc start' "end"
end <- getVals start'
forM_ (timert end) putStrLn
Outputs:
"hello"
begin -> after printing hello: 0.000039555s
after printing hello -> end: 1.333936928s
This seems to work fine for my very simple usecase.