module System.Time(module Time,module System.Time) where import Time -- | null time difference noTimeDiff = TimeDiff 0 0 0 0 0 0 0 --timeDiffToString --formatTimeDiff -- Quick hack, only a rough approximation normalizeTimeDiff (TimeDiff y mo d h mi s ps) = TimeDiff y' mo' d' h' mi' s' ps' where (s1, ps') = ps `quotRem` (10^12) (mi1,s') = (to s+s1) / 60 (h1,mi') = (to mi+mi1) / 60 (d1,h') = (to h+h1) / 24 (mo1,d') = (to d+d1) / 30 (y1,mo') = (to mo+mo1) / 12 y' = y+from y1 to = toInteger from = fromInteger x / y = (q,from r) where (q,r) = x `quotRem` y