Created
October 30, 2015 13:43
-
-
Save jaseemabid/0bbf7ab2e0eac6c2ecaa to your computer and use it in GitHub Desktop.
Get current time as an integer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Definitely not the best way to get current time as integer | |
currentPosixTime <- (getCurrentTime >>= return . utcTimeToPOSIXSeconds) | |
let currentTime = (round (read (init $ show(currentPosixTime)) :: Float) :: Integer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@joehillen seems like an exceptionally large package for the job. I might have to copy required functions verbatim.