From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA30604; Sat, 7 Jun 2003 14:15:14 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA30921 for ; Sat, 7 Jun 2003 14:15:12 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from smtp0.cp.tin.it (vsmtp0.virgilio.it [212.216.176.136] (may be forged)) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h57CFBH16641 for ; Sat, 7 Jun 2003 14:15:12 +0200 (MET DST) Received: from vsmtp5.tin.it (212.216.176.231) by smtp0.cp.tin.it (6.7.016) id 3EDFBB5900081348 for caml-list@inria.fr; Sat, 7 Jun 2003 14:15:10 +0200 Received: from furia (80.181.211.20) by vsmtp5.tin.it (6.7.016) id 3EE06529001482B7 for caml-list@inria.fr; Sat, 7 Jun 2003 14:15:09 +0200 Received: from localhost ([127.0.0.1] helo=furia) by furia with smtp (Exim 3.35 #1 (Debian)) id 19Ocd4-0002B0-00 for ; Sat, 07 Jun 2003 14:17:02 +0200 Date: Sat, 7 Jun 2003 14:17:02 +0200 From: Nick Name To: caml-list@inria.fr Subject: [Caml-list] Thread.delay, Unix.select, Unix.gettimeofday, Sys.time together? Message-Id: <20030607141702.28d583c6.nick.name@inwind.it> X-Mailer: Sylpheed version 0.7.4claws (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; gettimeofday:01 shorter:01 bug:01 float:02 unix:02 thread:02 btw:03 sys:03 suspect:05 problem:07 newline:07 function:09 similar:09 happens:10 100:89 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi all, I have a cycle similar to the following in my program: while true do Thread.delay mydelay; print_float Unix.gettimeofday (); print_newline() done If I put the delay into the cycle, I can't get less than 1/100 of second delay, on any machine I do this test. Is there a portable function that can do a shorter delay, say 1/1000 of second ad least? BTW, I have found a problem in using Sys.time and Thread.delay together: if I DON'T use Thread.delay, Sys.time returns an increasing value, as it's expected to. If I do a cycle like while true do Thread.delay mydelay; print_float Sys.time (); print_newline() done Sys.time returns an almost constant value! This also happens if I use Unix.select [] [] [] mydelay instead of Thread.delay. I suspect this happens because some sort of counter gets reset by a delay, but this makes no sense. If this might be a bug I'll do the bug report. thanks for attention Vincenzo ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners