From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id NAA11861 for caml-redistribution; Mon, 10 Jun 1996 13:10:21 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id AAA03225 for ; Sat, 8 Jun 1996 00:23:34 +0200 Received: from uu3.psi.com (uu3.psi.com [38.145.250.2]) by concorde.inria.fr (8.7.1/8.7.1) with SMTP id AAA06377 for ; Sat, 8 Jun 1996 00:23:33 +0200 (MET DST) Received: from flavors.com by uu3.psi.com (5.65b/4.0.940727-PSI/PSINet) via SMTP; id AA19479 for caml-list@pauillac.inria.fr; Fri, 7 Jun 96 18:23:28 -0400 Received: from [204.5.215.14] by flavors.com with SMTP (Apple Internet Mail Server 1.1); Fri, 7 Jun 1996 18:23:23 -0400 Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Fri, 7 Jun 1996 18:23:23 -0400 To: caml-list@pauillac.inria.fr From: e@flavors.com (Doug Currie, Flavors Technology, Inc.) Subject: Re: timer Cc: Bruno Petazzoni Sender: weis >[English: there is no means to measure elapsed time in Caml Light under PC or >Macintosh. Is there the necessary C code primitive already written somewhere ?] I did this for my Mac port of Caml Light 0.7 (which is not the official port) and for Mac Moscow ML (which is the official port and is based on my Mac Caml Light 0.7). In my Mac Caml Light 0.7 and in Mac Moscow ML I implemented three timers: - elapsed time - time spent in GC - time spent in "the cooperative multitasking experience" and primitives to create additional timers. To do this, macros to start and stop the various timers must be inserted in many places in the runtime code. The Caml Light team decided not to include my stuff, probably because so many changes were required in the source. If you would like to see how it's done, get the Mac Moscow ML from . Look at the file runtime.c and then look for uses of the macros beg_gc_time(), end_gc_time(), beg_mf_time(), and end_mf_time(). gettimeofday is also implemented there in e_gettimeofday.c. e