How to measure time a function takes to execute from an erlang shell?

erlang

Solution

Please see the article Measuring Function Execution Time.

It is all based on timer:tc/3 for the measurement.

Problem

Is there is a simple way to measure a function's execution time if I run that function from an erlang shell?

Original source