summaryrefslogtreecommitdiff
path: root/libraries/base/System/CPUTime.hsc
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-11-25 22:36:50 +0000
committerIan Lynagh <igloo@earth.li>2011-11-25 22:36:50 +0000
commit7b421c63aa9c1f48ff3d701155ad6a20d1fac222 (patch)
treeea3e09ba9cf54f3e50bb5112e5f44ab2da669a08 /libraries/base/System/CPUTime.hsc
parentab5fa6cf7aecbeb34406b1187003dd632c51fce6 (diff)
downloadhaskell-7b421c63aa9c1f48ff3d701155ad6a20d1fac222.tar.gz
Simplify some CPP
Diffstat (limited to 'libraries/base/System/CPUTime.hsc')
-rw-r--r--libraries/base/System/CPUTime.hsc6
1 files changed, 2 insertions, 4 deletions
diff --git a/libraries/base/System/CPUTime.hsc b/libraries/base/System/CPUTime.hsc
index 0b56329f38..e98234f9cc 100644
--- a/libraries/base/System/CPUTime.hsc
+++ b/libraries/base/System/CPUTime.hsc
@@ -112,8 +112,7 @@ getCPUTime = do
type CRUsage = ()
foreign import ccall unsafe getrusage :: CInt -> Ptr CRUsage -> IO CInt
-#else
-# if defined(HAVE_TIMES)
+#elif defined(HAVE_TIMES)
allocaBytes (#const sizeof(struct tms)) $ \ p_tms -> do
_ <- times p_tms
u_ticks <- (#peek struct tms,tms_utime) p_tms :: IO CClock
@@ -123,12 +122,11 @@ foreign import ccall unsafe getrusage :: CInt -> Ptr CRUsage -> IO CInt
type CTms = ()
foreign import ccall unsafe times :: Ptr CTms -> IO CClock
-# else
+#else
ioException (IOError Nothing UnsupportedOperation
"getCPUTime"
"can't get CPU time"
Nothing)
-# endif
#endif
#else /* win32 */