Type for Current Time Function
ashley at semantic.org
Fri Feb 4 06:37:45 EST 2005
The most basic or at least the most obvious function in a time library
is one that gets the current time. What is its return type?
getCurrentTime :: IO ???
There seems to be consensus that it should be some kind of encoding of
UTC rather than TAI. If you don't mind the hiccups, POSIX time is the
simplest way to (mostly) encode UTC. The simplest _correct_ way is a
(days,ticks) pair. A third alternative would be broken-down Calendar
time, with year, month, day etc.
What's the best choice for getCurrentTime?
Ashley Yakeley, Seattle WA
More information about the Libraries