[][src]Function lsl::local_clock

pub fn local_clock() -> f64

Obtain a local system time stamp in seconds.

This clock should be used for all time measurements that are intended to be used in relation to LSL time stamps, since LSL cannot time-synchronize other kinds of clocks for you. However, if you build an application in which you have your own synchronized clocks (e.g., atomic clocks), it can make sense to use those other clocks.

The resolution of this clock is better than a millisecond. The most common use case is to use this reading to assign time stamps to samples as they are being acquired. Specifically, if the age of a sample is known at a particular time (e.g., from USB transmission delays), it can be used as an offset to local_clock() to obtain a better (back-dated) estimate of when a sample was actually captured. See StreamOutlet::push_sample() for a use case.