English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Unix module troubles & Time functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-07-18 (13:30)
From: Julien Michel <julien.michel@e...>
Subject: Re: [Caml-list] Unix module troubles & Time functions
Quoting Jean-Christophe Filliatre <filliatr@lri.fr>:

> To do such a measurement, I'm using the Unix.times function, as
> follows:
> ======================================================================
> open Unix
> let utime f x =
>   let u = (times()).tms_utime in
>   let y = f x in
>   let ut = (times()).tms_utime -. u in
>   (y,ut)
> let print_utime f x =
>   let (y,ut) = utime f x in
>   Printf.printf "user time: %2.2f\n" ut;
>   y
> ======================================================================

Thanks for this piece of advice.
Yet, I work on standalone bytcode files, executed with "ocamlrun" on the target.

So I can not use Unix functions just writing "open Unix" and calling some of the
functions it provides us.

The problem remains the same: for the moment I am still not able to use the Unix

Any idea to fix that point?

This message was sent using IMP, the Internet Messaging Program.