[mercury-users] Converting time_t to int using common library?
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue Feb 13 17:53:48 AEDT 2007
On Tue, 13 Feb 2007 doug.auclair at logicaltypes.com wrote:
> I've run into a small problem, when I wish to initialize
> the supply in module random, I turn to the time module
> to give me an unique int (the current time). However,
> the time module returns a time_t, and the compiler
> (rightly) gripes that time_t is not an int (it's declared
> abstract in module time).
>
> You know that it's an int, and so do I.
I know nothing of the sort ;-)
Mercury's time_t is implemented as C's time_t. According to the C standard
time_t and clock_t are "arithmetic types capable of representing times."
There is no particular requirement for time_t to be a C int, let alone that
it should correspond to a Mercury one.
Julien.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list