Type for Current Time Function

Bayley, Alistair Alistair_Bayley at ldn.invesco.com
Fri Feb 4 07:03:05 EST 2005


> From: Ashley Yakeley [mailto:ashley at semantic.org] 
> 
> 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 ???


It looks as though POSIX should be avoided, so I vote for (days, ticks). Is
there some reason it couldn't (shouldn't) be an opaque type? i.e. with
functions to convert to-and-from:
 - (days, ticks)
 - seconds since epoch
 - Calendar Time (in various calendars and timezones, etc)
 - other arbitrary representations

-----------------------------------------
*****************************************************************
Confidentiality Note: The information contained in this   message, and any
attachments, may contain confidential   and/or privileged material. It is
intended solely for the   person(s) or entity to which it is addressed. Any
review,   retransmission, dissemination, or taking of any action in
reliance upon this information by persons or entities other   than the
intended recipient(s) is prohibited. If you received  this in error, please
contact the sender and delete the   material from any computer.
*****************************************************************



More information about the Libraries mailing list