From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id EB1E97F0A3 for ; Sat, 5 Sep 2015 18:59:50 +0200 (CEST) IronPort-PHdr: 9a23:37F2ChGuPg6Tzp7VrMrHLZ1GYnF86YWxBRYc798ds5kLTJ75ocWwAkXT6L1XgUPTWs2DsrQf27aQ6/iocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC04Lvj6ibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwu3cYh/V0vfoKdKzgfLkjBYMeRnwZPmGC4cTts1OLGQ6G/HgBSSMJnxtTGA3M6hfSX5G3rjb/8OZwjnq0J8rzGJ85Qzjq1LtsTAftgSEBf2o49m/QosN9lq4euw6mowR6yojSJo2YYqktNpjBdM8XEDISFv1aUDZMV9ux Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=info@gerd-stolpmann.de; spf=None smtp.mailfrom=info@gerd-stolpmann.de; spf=None smtp.helo=postmaster@mout.kundenserver.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.126.130; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.126.130; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.kundenserver.de) identity=helo; client-ip=212.227.126.130; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@mout.kundenserver.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DVAQBzHutVlIJ+49Reg3dpgySqUoZxiROBbQyCQYJsSgKBJTkTAQEBAQEBAQEQAQEBAQcLCwkfMIIdggcBAQMBIzIkBQsLQgICVwYTCRKICwwJtRKUIAEBAQEBAQQBAQEBAQEchXiFdoRmJgeCLgwvEoExBYcxjiR3AoQRh3CBTEaGZgOOEINshChvAQEBiUcBAQE X-IPAS-Result: A0DVAQBzHutVlIJ+49Reg3dpgySqUoZxiROBbQyCQYJsSgKBJTkTAQEBAQEBAQEQAQEBAQcLCwkfMIIdggcBAQMBIzIkBQsLQgICVwYTCRKICwwJtRKUIAEBAQEBAQQBAQEBAQEchXiFdoRmJgeCLgwvEoExBYcxjiR3AoQRh3CBTEaGZgOOEINshChvAQEBiUcBAQE X-IronPort-AV: E=Sophos;i="5.17,475,1437429600"; d="asc'?scan'208";a="176166944" Received: from mout.kundenserver.de ([212.227.126.130]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2015 18:59:50 +0200 Received: from office1.lan.sumadev.de ([88.69.138.237]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0MJawd-1ZVEY21Jz1-0036vE; Sat, 05 Sep 2015 18:59:49 +0200 Received: from [192.168.65.10] (unknown [192.168.65.10]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 98DBEDC05D; Sat, 5 Sep 2015 18:59:48 +0200 (CEST) Message-ID: <1441472377.5306.45.camel@e130.lan.sumadev.de> From: Gerd Stolpmann To: "\"Markus W." =?ISO-8859-1?Q?Wei=DFmann=22?= Cc: caml-list Date: Sat, 05 Sep 2015 18:59:37 +0200 In-Reply-To: <2CA44FB5-DDEF-48A6-8567-99DCE4A0BA66@in.tum.de> References: <2CA44FB5-DDEF-48A6-8567-99DCE4A0BA66@in.tum.de> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-7wP7q/fVBfkMRg88duyQ" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 X-Provags-ID: V03:K0:U0ZddocHiqwj0oyDmjpUWBlh44Zwo9WmFDzY5SdWIqGsLoVIjNi IQgAv9d3KUNqt2lmqqBrFy7XgBrMq95vkAUkOQ9YNttx2qKS2DOzYGjL3W2URKBYRP9hmej HMTHXR9ppT8AElq2Wsd49fkiWyZlskcJE4zuyx7bm6SPwKNq03MT3HhYM+OBtVSoG/InJAI ckXOOKixyNUwRbKKm9Eog== X-UI-Out-Filterresults: notjunk:1;V01:K0:6XtOb6Fv0ng=:VkiAMFxtSaCu7z5/AtJZFJ eOs823Do6l9NNPf6OIvMyHUDM1h/YvkFgY5DfgArVaKSfulGJ7nZ4O7XmgzxcORbkVJHipNzL 5wN8lCmUd1ety5a12h3YkXsrG5SR8EdVfOLIiozxk5xjxeQuHUNZk63XoEvYTqculU1uWZj3U 2vbOz698MJi7Gr+i2MEWVrjJUaIT9cRjdj5xJs9bCaqz49QHL6dgz1NU33bgwsqoTGhqsDRoV JZ5hRZpdFcfeIvbFcY0UE934Dx0bvBcdVbWHKntsizPjVk318KtYy/8GyVNO3Hh4HsRKTPjXK gA9PxYBc/IF5Qx05WAw7tyklmwSbj5fO9u/UPGG8yiU9s3ixI83jZAf98pjcrENaGpvOmA2I/ QtQ/bb7HMdn9nHKvwJT8qxjdRQxpDiOq3ceo3kLLOudIhrlxJcrjkxK/YHGRlIvpT8IxNQT3L mBMAm75vUUiU7WbTm8lyNMRShHl/4iNkpmX4ZCBYK4phkAO7joL8m7Y9a1L+x18x3w0CX3zQb OIt/LC9W/uERY1WWBM6s/C4bLcfRSQFnrijjvrl5aK/HPkUHNw5PCuHMhstad6Dfy05u+caIl 6sP2fPP+l/PUTrslKkEvw2xbRLwkQQp7Pi+QIw4yj4yjkUyjrfG4hcfSxET2j6Y0NP/aLrpo0 cOXq7L6Sb2wjVmZp4V13YYPmU1J7wsiXKG66R0aG7Kqs772R4mAC3EUtkzTQ/UJPMqGE= Subject: Re: [Caml-list] POSIX time implementation --=-7wP7q/fVBfkMRg88duyQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am Samstag, den 05.09.2015, 13:52 +0200 schrieb "Markus W. Wei=C3=9Fmann": > Hi, >=20 > * Netsys.clock_gettime from ocamlnet [4] implements =E2=80=99struct times= pec=E2=80=99 but has it as float/int for seconds/nanoseconds (whats with th= e float? All systems I found use either in32 or int64 for time_t) I picked float for ease of use, and better compatibility with the time functions in Unix (which all use floats for time_t). Only the integral part is put into the float which provides 52 bits for the mantissa, so it is really large enough. > I=E2=80=99d like my library to be a good OCaml citizen and _not_ implemen= t my own special purpose timing functions (which are incompatible to everyo= ne else=E2=80=99s). > Ptime looks like the ultimate solution for the datatype; ocamlnet gets th= e closest to my requirements =E2=80=94 while being a gigantic library most = of which has nothing to do with the domain of mqueue. You'd only need the netsys part, which is practically standalone. None of the other modules would get linked in. (I guess your are programming for embedded platforms as POSIX message queues are typically found there, and the size of executable probably matters.) Of course you could also just copy the C code. OCamlnet has a liberal license. Gerd > I=E2=80=99m a bit stuck on this one and would like to get some advice =E2= =80=94 and/or corrections if I misinterpreted one of the above solutions. >=20 > regards > -Markus >=20 > [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html > [2] http://mqueue.forge.ocamlcore.org/ > [3] http://caml.inria.fr/pub/docs/manual-ocaml/libref/Unix.html > [4] http://projects.camlcity.org/projects/dl/ocamlnet-4.0.4/doc/html-main= /Netsys_posix.html > [5] http://erratique.ch/software/mtime > [6] http://erratique.ch/software/ptime >=20 > --=20 > Markus Wei=C3=9Fmann, M.Sc. > Technische Universit=C3=A4t M=C3=BCnchen > Institut f=C3=BCr Informatik > Boltzmannstr. 3 > D-85748 Garching > Germany > http://wwwknoll.in.tum.de/ >=20 >=20 --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-7wP7q/fVBfkMRg88duyQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJV6x96AAoJEAaM4b9ZLB5TjhMH/iypfSQN5BcNzOOVOr/1dsrE 2qLUK+ltJpYApEztvWVBrOSf2PAmYa8WSD9YsX6uMkhUPxfcnei/2IV4vQXJBj96 ic5f5ZzFkxn+kn3u8y++T8/k19JC6Hcl1hOwvteFsHGj+rXHIl7O7ra+wuGfaoA3 oqTSdgzmz003dv6DY8b6LtZge6tEmaz7sBdFLFCQmf2jukaA3K6QHvJsv7SjvLN6 X2CWi5OusMbj1J5D7xLiagN4zZqNrRwTeiY2OT6j9uwmp6j8xCIgVN9G9QiO0bLI bN4UFE6bqZd9UydV06udv/ijdZGmWTM4/ElZ4bDPzEcWQ0YcYAHAlLYOtHcrjH8= =i2dB -----END PGP SIGNATURE----- --=-7wP7q/fVBfkMRg88duyQ--