[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] [RFC] Ptime (was Re: Unix.tm, CLOCK: date handling in MirageOS)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384

On 06/25/2015 18:23, Daniel BÃnzli wrote:
> I have now settled down on an interface for Ptime and would
> welcome
feedback about it. Here's the documentation:

Thanks, Daniel.

I'm a bit worried about:

val is_date_valid : date -> bool
val is_utc_time_valid : utc_time -> bool
val is_date_utc_time_valid : date * utc_time -> bool


Shouldn't the validity invariants hold by construction -- at least I'd
prefer that it's not possible to create a date & utc_time which are
invalid.  That'd require some constructor functions and accessors for
date and utc_time, but I'd prefer it over those valid_* functions
which users will need to call.

I also wonder since the finest granularity are seconds whether
add/sub/diff should take an int instead of a float?  Or, what is the
meaning of adding .5 to a t?


Hannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCQAGBQJVjUpHAAoJELyJZYjffCju99YQAJo4loFq4MEo+or1tU/fTT5d
SBjQHMN4oX9kQGuo0lsBfGKMKfg42Xzzu4HEZ4hS/b4lHKFsD3eGI6uYuccoFlwy
bDWOejdyhygM+hMHzm/2q543d4B5Rxn9NFBAqHyEZmWspw0G+TzLOlxUEnlB2QLk
cAijU4wSYpXjs4DD5JCUPE9lmDRZdMVB+4V3sS+0ogaUOWUiqpATSPsQgCny2oCP
BhbKi2FtkAqyGrF00EiaHk0hq56I+Bv4Sr4Qsby3w7tcFDg50hUqHwTrNHudtt0+
IasviUU9oAhJVtRWoyo1S+4oYEkQadcpkMCmn5zLBRPfRT5Gu9SffllFR/tobsZp
/uTFYQx5m2Yo2o271PlTLPwRcIQwQYzZbmXW1kDF7LSq7xc9p4M4oUqA5Hjar9HG
DW6Iczc7BPOOiSOmL8mB6TWNcExpRlBqEIf62NV+mSH4H9rcNbm0NWXcQ+Z2Prm+
XG7Ewri/pVfsdOgKhcHxOHlgiNGwTC1r9ldjgdFp4GbunuIZ9+PSAvZzaRZb5fRa
ADu8ABWUdn9m55Veq3kOGsHVMb9tO/Sy7ZTPgyDKLvGU3EDvo0vbjDZ4SjrlTZu+
5rr4ahPLKTcW32cVlNCOTaSDO5fqpkkVLktlJheZ3d7ecvoGsc03Fk10NTeb+URq
c1wtYlq5MLwLytgcG3uI
=PXzm
-----END PGP SIGNATURE-----

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.