From eea5f896780e07f7ca76685061d01e7be5a7abaa Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 11 Sep 2014 18:26:26 +0200 Subject: erts, kernel: Add os:perf_counter function The perf_counter is a very very cheap and high resolution timer that can be used to timestamp system events. It does not have monoticity guarantees, but should on most OS's expose a monotonous time. A special instruction has been created for this counter to further speed up fetching it. OTP-12908 --- erts/doc/src/erlang.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index d0d35ea25f..6915b35fcb 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -131,6 +131,17 @@ + perf_counter +

Symbolic representation of the performance counter + time unit used by the Erlang runtime system.

+ +

The perf_counter time unit behaves much in the same way + as the native time unit. That is it might differ inbetween + run-time restarts. You get values of this type by calling + os:perf_counter() +

+
+

The time_unit/0 type may be extended. Use -- cgit v1.2.3