aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/socket_test_lib.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-12-20 15:04:58 +0100
committerMicael Karlberg <[email protected]>2018-12-20 15:04:58 +0100
commit6a0772d1af0cd36915736ff65a450a618209fec1 (patch)
tree1729c44593e537916e52a6db0092e76dcbc5a9fc /erts/emulator/test/socket_test_lib.erl
parent2f80f039958b4ec6ab3306df777b6b1a4872a495 (diff)
parent6cf1c94341dc274e93015f3b001b171140c5cba8 (diff)
downloadotp-6a0772d1af0cd36915736ff65a450a618209fec1.tar.gz
otp-6a0772d1af0cd36915736ff65a450a618209fec1.tar.bz2
otp-6a0772d1af0cd36915736ff65a450a618209fec1.zip
Merge branch 'bmk/20181214/nififying_inet_ttest_in_suite/OTP-14831' into bmk/20180918/nififying_inet/OTP-14831
Diffstat (limited to 'erts/emulator/test/socket_test_lib.erl')
-rw-r--r--erts/emulator/test/socket_test_lib.erl18
1 files changed, 18 insertions, 0 deletions
diff --git a/erts/emulator/test/socket_test_lib.erl b/erts/emulator/test/socket_test_lib.erl
index f55f338ef9..4e65c4f3c0 100644
--- a/erts/emulator/test/socket_test_lib.erl
+++ b/erts/emulator/test/socket_test_lib.erl
@@ -21,6 +21,8 @@
-module(socket_test_lib).
-export([
+ pi/1, pi/2, pi/3,
+
%% Time stuff
timestamp/0,
tdiff/2,
@@ -38,6 +40,22 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+pi(Item) when is_atom(Item) ->
+ pi(self(), Item).
+
+pi(Pid, Item) when is_pid(Pid) andalso is_atom(Item) ->
+ {Item, Info} = process_info(Pid, Item),
+ Info;
+pi(Node, Pid) when is_pid(Pid) ->
+ rpc:call(Node, erlang, process_info, [Pid]).
+
+pi(Node, Pid, Item) when is_pid(Pid) andalso is_atom(Item) ->
+ rpc:call(Node, erlang, process_info, [Pid, Item]).
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
timestamp() ->
os:timestamp().