Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions repa-io/Data/Array/Repa/IO/Timing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ module Data.Array.Repa.IO.Timing
, prettyTime)
where
import System.CPUTime
import System.Time
import Data.Time.Clock.System
( SystemTime (..)
, getSystemTime
)


-- Time -----------------------------------------------------------------------
Expand Down Expand Up @@ -58,8 +61,10 @@ getTime :: IO Time
getTime =
do
cpu <- getCPUTime
TOD sec pico <- getClockTime
return $ Time cpu (pico + sec * 1000000000000)
MkSystemTime sec nano <- getSystemTime
return $ Time cpu
$ fromIntegral sec * 1000000000000
+ fromIntegral nano * 1000


-- | Show a time as a string, in milliseconds.
Expand Down
2 changes: 1 addition & 1 deletion repa-io/repa-io.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Library
, binary >= 0.7 && < 0.9
, bmp >= 1.2 && <1.3
, bytestring >= 0.10 && < 0.13
, old-time == 1.1.*
, repa >= 3.4 && <3.5
, time >= 1.8 && < 1.15
, vector >= 0.11 && < 0.14

ghc-options:
Expand Down