Skip to content

Instantly share code, notes, and snippets.

@jaseemabid
Created October 30, 2015 13:43
Show Gist options
  • Save jaseemabid/0bbf7ab2e0eac6c2ecaa to your computer and use it in GitHub Desktop.
Save jaseemabid/0bbf7ab2e0eac6c2ecaa to your computer and use it in GitHub Desktop.
Get current time as an integer
-- Definitely not the best way to get current time as integer
currentPosixTime <- (getCurrentTime >>= return . utcTimeToPOSIXSeconds)
let currentTime = (round (read (init $ show(currentPosixTime)) :: Float) :: Integer)
@jaseemabid
Copy link
Author

@joehillen seems like an exceptionally large package for the job. I might have to copy required functions verbatim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment