[][src]Function libeyelink_sys::current_usec

pub unsafe extern "C" fn current_usec() -> UINT32

@ingroup access_time_local Returns the current microsecond since the initialization. Equivalent to \c current_micro() and \c current_double_usec().

@remarks If the eyelink_exptkit library is not initialized, or initialized multiple times, the return value is invalid and unpredictable. The call to \c current_usec() is equivalent to \c current_micro(NULL). The function is very platform dependent. Platforms such as windows 95, 98, ME may not return usec properly. Ie. It may return current_time() * 1000. @return The current microsecond since the initialization of the library, modulo 2^32.

\b Example:

\code

#include 
#include 

MICRO m1, m2;  // Special high-resolution time structure

current_micro(&m1);
eyemsg_printf("Delay test starts: %ld", current_usec());

msec_delay(100);

current_micro(&m2);
eyemsg_printf("Delay test ends: %ld", current_usec());

eyemsg_printf("Total Delay: %6.3f",
m2.msec + m2.usec/1000.0 - m1.msec + m1.usec/1000.0);
\endcode

\b Output:

\code
MSG	5441107 Delay test starts: 4610094
MSG	5441206 Delay test ends: 4710005
MSG	5441206 Total Delay: 100.003
\endcode

\sa \c current_micro(), \c current_double_usec(), \c current_msec(), \c current_time() and \c msec_delay()