efficient and simpler time API for haskell