How can I get the monotonic time from boot in nanoseconds in Go? I need the same value that the following C code would return:
static unsigned long get_nsecs(void)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec * 1000000000UL + ts.tv_nsec;
}
The functions in the time
package seem to return the current time and/or date.