module Main
  where

import IO
import Random
import System.Time

toSeconds :: ClockTime -> Double
toSeconds (TOD x y) = 
  fromInteger x +  (fromInteger y) / 1000000000000.0

tdToSeconds :: TimeDiff -> Double
tdToSeconds td = 
 toSeconds (addToClockTime td (TOD 0 0))

testTD = (diffClockTimes (TOD 1218999539 946978000000) (TOD 1218999540 931424000000))

main = do
 print testTD
 print (tdToSeconds testTD)
