@@ -878,21 +878,22 @@ cluster_nodes1(_, _, _, []) ->
878878 ok .
879879
880880handle_nodes_in_parallel (NodeConfigs , Fun ) ->
881- T0 = erlang :timestamp (),
881+ T0 = erlang :monotonic_time (),
882882 Parent = self (),
883883 Procs = [
884884 begin
885885 timer :sleep (rand :uniform (1000 )),
886886 spawn_link (fun () ->
887- T1 = erlang :timestamp (),
887+ T1 = erlang :monotonic_time (),
888888 Ret = Fun (NodeConfig ),
889- T2 = erlang :timestamp (),
889+ T2 = erlang :monotonic_time (),
890890 ct :pal (
891891 ? LOW_IMPORTANCE ,
892892 " Time to run ~tp for node ~ts : ~b us" ,
893893 [Fun ,
894894 ? config (nodename , NodeConfig ),
895- timer :now_diff (T2 , T1 )]),
895+ erlang :convert_time_unit (
896+ T2 - T1 , native , microsecond )]),
896897 Parent ! {parallel_handling_ret ,
897898 self (),
898899 NodeConfig ,
@@ -903,11 +904,11 @@ handle_nodes_in_parallel(NodeConfigs, Fun) ->
903904 wait_for_node_handling (Procs , Fun , T0 , []).
904905
905906wait_for_node_handling ([], Fun , T0 , Results ) ->
906- T3 = erlang :timestamp (),
907+ T3 = erlang :monotonic_time (),
907908 ct :pal (
908909 ? LOW_IMPORTANCE ,
909910 " Time to run ~tp for all nodes: ~b us" ,
910- [Fun , timer : now_diff (T3 , T0 )]),
911+ [Fun , erlang : convert_time_unit (T3 - T0 , native , microsecond )]),
911912 Results ;
912913wait_for_node_handling (Procs , Fun , T0 , Results ) ->
913914 receive
0 commit comments