]> git.netwichtig.de Git - user/henk/code/haskell/diddohs.git/blobdiff - HMSTime.hs
On branch master
[user/henk/code/haskell/diddohs.git] / HMSTime.hs
index 6e903d3a981bbb55f5a47adaf57fbead0fc32592..cbe9e0914d752ac9b6ff62b416a39d646bfe75da 100644 (file)
@@ -14,8 +14,8 @@ instance Show HMSTime where
   show (HMSTime h m s) = printf "%d:%02d:%02d" h m s
 
 secondsToHMS :: Integer -> HMSTime
-secondsToHMS seconds =  HMSTime h m s where
-                          (mLeft, s) = seconds `divMod` 60
+secondsToHMS numSeconds = HMSTime h m s where
+                          (mLeft, s) = numSeconds `divMod` 60
                           (h, m)     = mLeft `divMod` 60
 
 hmsTimeStringToHMSTime :: String -> HMSTime
@@ -28,9 +28,6 @@ hmsTimeToSeconds (HMSTime {hours = h, minutes = m, seconds = s}) = h*3600 + m*60
 hmsTimeStringToSeconds :: String -> Integer
 hmsTimeStringToSeconds = hmsTimeToSeconds . hmsTimeStringToHMSTime
 
-hmsIntsToSeconds :: [Int] -> Int
-hmsIntsToSeconds (h:m:s:_) = (3600*h + 60*m + s)
-
 readInteger :: String -> Integer
 readInteger x = read x :: Integer