Time Libraries Rough Draft

Ketil Malde ketil+haskell at ii.uib.no
Thu Feb 10 06:13:36 EST 2005


Ashley Yakeley <ashley at semantic.org> writes:

> System.Time.Clock:

>   * UTC arithmetic
>   * types or type-synonyms for Julian days and dates (for UT1)
>   * getting the current UTC time

(I'd call these -- anything that maps SI seconds to other structures,
really -- calendars, but I guess I've said so enough times already :-)

>   * getting the current "CPU time"

Isn't this very system dependent?  And isn't times(2) a better choice
than clock(3)?  How do these behave in the presence of leap seconds?
I.e. if I clock() a computation, do I get the same result as
the difference of gettimeofday()s before and after times CPU
utilization, or do I get the correct times, and the consequential a
leap-second offset compared to gettimeofday?

I'm not able to find any information on this; I assume these functions
deal in (non-linear) POSIX time, since you want them in the same
module?

(I would put everyting to do with performance meausrements in a
different module.  Although, I guess if we only target POSIX systems,
this is all right.  The consensus seems to be to wed time to POSIX.) 

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants



More information about the Libraries mailing list