<div dir="ltr">You can adapt the source code of timer:tc/1 to use nano_seconds timing rather than microseconds, but I would be weary you can get accurate timing at the nanosecond scale by running a single experiment. You would have to run more rounds and divide in order to figure out what a real timing would be.<div><br></div><div>Also, you should collect many samples, and do bootstrapping on the dataset in order to figure out if the average is a stable number, or if it is likely to have been perturbed by something.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 21, 2015 at 8:23 AM, Felix Gallo <span dir="ltr"><<a href="mailto:felixgallo@gmail.com" target="_blank">felixgallo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"><a href="http://www.erlang.org/doc/man/timer.html#tc-1" target="_blank">http://www.erlang.org/doc/man/timer.html#tc-1</a></p>
<p dir="ltr">Is a good place to start.  </p>
<p dir="ltr">F. </p>
<div class="gmail_quote"><div><div class="h5">On Nov 20, 2015 11:18 PM, "Benjamin Adams" <<a href="mailto:ben@ethanstack.com" target="_blank">ben@ethanstack.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><u></u><div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif">Hello,<br><br>How would I go about calculating Nanoseconds for a function call.  Want to use it for language profiling. <br><br>Time.start()<br>Fun() ->......<br>Receive<br>Io:format("nanoseconds: ~p", [Time.stop()]),<br>End.<br><br>Something like that.<br>
                <div></div>
        <br>
                <div>-----<br>Ben Adams<br></div>
                <div></div>
        </div></div><br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">J.</div>
</div>