File: graphfloat.ml

package info (click to toggle)
ocamlviz 1.01-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,196 kB
  • sloc: ml: 5,722; makefile: 198
file content (36 lines) | stat: -rw-r--r-- 1,322 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(**************************************************************************)
(*                                                                        *)
(*  Ocamlviz --- real-time profiling tools for Objective Caml             *)
(*  Copyright (C) by INRIA - CNRS - Universite Paris Sud                  *)
(*  Authors: Julien Robert                                                *)
(*           Guillaume Von Tokarski                                       *)
(*           Sylvain Conchon                                              *)
(*           Jean-Christophe Filliatre                                    *)
(*           Fabrice Le Fessant                                           *)
(*  GNU Library General Public License version 2                          *)
(*  See file LICENSE for details                                          *)
(*                                                                        *)
(**************************************************************************)

open Ocamlviz

let float_test = Value.observe_float_ref  "float_test" (ref 0.)
  
let () = 
  init ();
  while true do
    float_test := !float_test +. (Random.float 2.);
    log "%f @." !float_test;
    Unix.sleep 1
  done;
 





(*
Local Variables: 
compile-command: "unset LANG; make -C .. test-graphfloat"
End: 
*)