Proposal: Add CUSeconds, CSUSeconds to Foreign.C.Types, and fix definition of CTimeval

Bas van Dijk v.dijk.bas at gmail.com
Sat Apr 23 00:58:49 CEST 2011


+1

It would also be great if CTimeval could be exported from somewhere.
It is already being used in the event manager, the time package and
yesterday Johan Dobbelstein send me a patch to add it to usb:

https://github.com/basvandijk/usb/blob/async/Timeval.hs

Would Foreign.C.Types be a good place to export it from?

Bas

On 22 April 2011 22:25, Ian Lynagh <igloo at earth.li> wrote:
>
> Hi all,
>
> This is a proposal to add CUSeconds, CSUSeconds to Foreign.C.Types
> (which are Haskell versions of the C useconds_t and suseconds_t types),
> and fix the definition of CTimeval to use CTime and CSUSeconds rather
> than CLong.
>
> The C types are specified here:
>    http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html
>
> This will fix a bug in getCPUTime on OS X.
>
> Patches, from William Knop, to implement this are here:
>    http://hackage.haskell.org/trac/ghc/attachment/ticket/4970/0001-Add-Haskell-types-for-C-types-useconds_t-and-susecon.patch
>    http://hackage.haskell.org/trac/ghc/attachment/ticket/4970/0002-Whitespace-only.-This-patch-is-part-2-of-4-for-trac-.patch
>    http://hackage.haskell.org/trac/ghc/attachment/ticket/4970/0003-Use-CSUSeconds-in-getCPUTime-and-getCurrentTime.-Fix.patch
>    http://hackage.haskell.org/trac/ghc/attachment/ticket/4970/0001-Use-CSUSeconds-rather-than-CTime-in-getClockTime.-Fi.patch
>
>
> Discussion deadline: 7 May 2011
>
>
> Thanks
> Ian
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>



More information about the Libraries mailing list