<p dir="auto">Go's standard library doesn't provide any API to access a monotonic clock source, which means one can't reliably time how long an operation takes without copy-pasting or importing some low-level platform-dependent code such as the <code class="notranslate">clock</code> package at <a href="https://github.com/davecheney/junk">https://github.com/davecheney/junk</a>.</p>
<p dir="auto">This API doesn't necessarily need to return a <code class="notranslate">time.Time</code>, just returning a number of nanoseconds as a <code class="notranslate">uint64</code> would be enough, kinda like Java's <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/System.html#nanoTime--" rel="nofollow"><code class="notranslate">System.nanoTime()</code></a>.</p>
<p dir="auto">by <strong>viriketo</strong>:</p>
<pre class="notranslate">I have a go program that fails rarely, and the backtrace isn't enough information for
me. I'd like a way to get core dumps generated for later analysis with gdb, using some
go call.

Something similar to what a null pointer resolution would do in a C program; running
that program in a proper environment will dump a core file for analysis.

Thread related to this: <a href="https://groups.google.com/forum/#" rel="nofollow">https://groups.google.com/forum/#</a>!topic/golang-nuts/ZK720ICum8E</pre>