Skip to content

Replace old-time with time in repa-io#32

Open
dancewithheart wants to merge 1 commit into
haskell-repa:masterfrom
dancewithheart:replace-old-time
Open

Replace old-time with time in repa-io#32
dancewithheart wants to merge 1 commit into
haskell-repa:masterfrom
dancewithheart:replace-old-time

Conversation

@dancewithheart
Copy link
Copy Markdown

This replace deprecated old-time with time.

Test

Build succeed:

cabal build all

Small smoke test that execute modified getTime indirectly using exported time function:

time p = do
start <- getTime
x <- p
end <- getTime
return (x, end `minus` start)

like so:

import Control.Concurrent (threadDelay)
import Data.Array.Repa.IO.Timing

main :: IO ()
main = do
  (_, elapsed) <- time (threadDelay 10000)
  putStrLn (prettyTime elapsed)

executed:

cabal exec -- runghc repa-io-timing-smoke.hs

gives output:

elapsedTimeMS   = 10
cpuTimeMS       = 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant