include/mxUtil.h
inline double timeSystem() {
#ifdef WINDOWS
    SYSTEMTIME tbuf;
    GetSystemTime(&tbuf);
    return( (double)(tbuf.wSecond + (double)tbuf.wMilliseconds / 1000.0) );
#else
    struct timeval tv;
    gettimeofday( &tv, NULL );
    return( (double)(tv.tv_sec + (double)tv.tv_usec / 1000000.0) );
#endif
}
// Returns system (wall clock) time in seconds
Returns system (wall clock) time in seconds
Returns system ( wall clock ) time in seconds
inline double timeSystem() {
#ifdef WINDOWS
    SYSTEMTIME tbuf;
    GetSystemTime(&tbuf);
    return( (double)(tbuf.wSecond + (double)tbuf.wMilliseconds / 1000.0) );
#else
    struct timeval tv;
    gettimeofday( &tv, NULL );
    return( (double)(tv.tv_sec + (double)tv.tv_usec / 1000000.0) );
#endif
}
inline double timeSystem ( ) { #ifdef WINDOWS SYSTEMTIME tbuf ; GetSystemTime ( & tbuf ) ; return ( ( double ) ( tbuf . wSecond + ( double ) tbuf . wMilliseconds / 1000.0 ) ) ; #else struct timeval tv ; gettimeofday ( & tv , NULL ) ; return ( ( double ) ( tv . tv_sec + ( double ) tv . tv_usec / 1000000.0 ) ) ; #endif }
Returns system (wall clock) time in seconds
Returns system ( wall clock ) time in seconds