On Mon May 19 10:04:28 EDT 2014, lu...@proxima.alt.za wrote:
> > i indirectly heard "go needs it", but that is not really a reason
> > i can understand technically.  why must it be a system call?
> 
> Actually, Go raised an important alert, quite indirectly: when using
> high resolution timers, the issue of opening a device, reading it and
> converting the input value to a binary value can and in this case is
> very expensive.
>
> Curiously, the actual symptom - I cannot remember how it came about -
> was that using the timer leaked file descriptors, or, more likely,
> gave the impression of leaking file descriptors.  But the reality is
> that nanosecond accuracy cannot be achieved from reading a device by
> conventional means.

i think my original question still stands.  what is the purpose of timing,
what is the desired accuracy and precision, and is a relative or absolute
time wanted?  

a relative time (say a time adjusted with timesync, including leap seconds, etc)
is not what you want if you want relative timing.  something like the
timestamp counter makes a lot more sense.

i took a quick look at the runtime·nanotime, and it looks like it's being
used for gettimeofday, which shouldn't be super performance sensitive.

- erik

Reply via email to