aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/remoteCounter.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/remoteCounter.ml')
-rw-r--r--lib/remoteCounter.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/remoteCounter.ml b/lib/remoteCounter.ml
index 72887b21a..c0217b22e 100644
--- a/lib/remoteCounter.ml
+++ b/lib/remoteCounter.ml
@@ -37,6 +37,9 @@ let new_counter ~name a ~incr ~build =
let backup () = !counters
+let snapshot () =
+ List.map (fun (n,v) -> n, Obj.repr (ref (ref !!(Obj.obj v)))) !counters
+
let restore l =
List.iter (fun (name, data) ->
assert(List.mem_assoc name !counters);