anchor.diff:  -export([start1/0]).
   
   %% Internal exports
  --export([do_measure_codec/8, do_measure_codec_loop/7]).
  +-export([do_measure_codec/7, do_measure_codec_loop/7]).
   -export([flex_scanner_handler/1]).
   
   
  
positive.code:     end.
  
  
  do_measure_codec(Factor, Parent, Codec, Func, Conf, Version, Bin, MCount) ->
      {ok, Count} = measure_warmup(Codec, Func, Conf, Version, Bin, MCount),
      Count2      = Count div Factor,
      %% io:format("do_measure_codec(~w, ~w) -> warmed up:"
      %%           "~n      MCount: ~w"
      %%           "~n      Count:  ~w"
      %%           "~n      Count2: ~w", [Codec, Func, MCount, Count, Count2]),
      Res = timer:tc(?MODULE, do_measure_codec_loop, 
  		   [Codec, Func, Conf, Version, Bin, Count2, dummy]),
      case Res of
  	{Time, {ok, M}} ->
  	    %% io:format("~w ", [Time]),
  	    Parent ! {measure_result, self(), Func, {M, Count2, Time}};
  	{_Time, Error} ->
  	    Parent ! {error, self(), Error}
      end,
      unlink(Parent). % Make sure Parent don't get our exit signal
  
  
  %% This function does more or less what the real measure function
  
negative.code:        is_atom(Func) andalso
         is_list(Conf) andalso
         is_integer(MCount) andalso (MCount > 0) ->
      {Pid, MRef} =
          spawn_monitor(?MODULE, do_measure_codec, 
                        [Factor, Codec, Func, Conf, Version, Bin, MCount]),
      receive
          {'DOWN', MRef, process, Pid, {measure_result, Res}} ->
  	    {ok, Res};
  	{'DOWN', MRef, process, Pid, {error, Error}} ->
  	    {error, Error};
  	{'DOWN', MRef, process, Pid, Else} ->
  	    {error, {unexpected_result, Else}}
      after ?MEASURE_TIMEOUT ->
  	    Info = 
  		case (catch process_info(Pid)) of
  		    I when is_list(I) ->
                          erlang:demonitor(MRef),
  			exit(Pid, kill),
  			I;
  		    _ ->
  