app/src/time.h
static uint64_t GetTicks() {
#if FIREBASE_PLATFORM_WINDOWS
    LARGE_INTEGER ticks;
    QueryPerformanceCounter(&ticks);
    return ticks.QuadPart;
#elif FIREBASE_PLATFORM_LINUX
    struct timespec time;
    clock_gettime(CLOCK_MONOTONIC, &time);
    return (static_cast<uint64_t>(time.tv_sec) * 1000000000ULL) + time.tv_nsec;
#else
    struct timeval time;
    gettimeofday(&time, NULL);
    return (static_cast<uint64_t>(time.tv_sec) * 1000000ULL) + time.tv_usec;
#endif  // FIREBASE_PLATFORM_WINDOWS, FIREBASE_PLATFORM_LINUX
  }
// Get the number of counter ticks elapsed.
Get the number of counter ticks elapsed.
Get the number of counter ticks elapsed .
static uint64_t GetTicks() {
#if FIREBASE_PLATFORM_WINDOWS
    LARGE_INTEGER ticks;
    QueryPerformanceCounter(&ticks);
    return ticks.QuadPart;
#elif FIREBASE_PLATFORM_LINUX
    struct timespec time;
    clock_gettime(CLOCK_MONOTONIC, &time);
    return (static_cast<uint64_t>(time.tv_sec) * 1000000000ULL) + time.tv_nsec;
#else
    struct timeval time;
    gettimeofday(&time, NULL);
    return (static_cast<uint64_t>(time.tv_sec) * 1000000ULL) + time.tv_usec;
#endif  
  }
static uint64_t GetTicks ( ) { #if FIREBASE_PLATFORM_WINDOWS LARGE_INTEGER ticks ; QueryPerformanceCounter ( & ticks ) ; return ticks . QuadPart ; #elif FIREBASE_PLATFORM_LINUX struct timespec time ; clock_gettime ( CLOCK_MONOTONIC , & time ) ; return ( static_cast < uint64_t > ( time . tv_sec ) * 1000000000ULL ) + time . tv_nsec ; #else struct timeval time ; gettimeofday ( & time , NULL ) ; return ( static_cast < uint64_t > ( time . tv_sec ) * 1000000ULL ) + time . tv_usec ; #endif }
Get the number of counter ticks elapsed.
Get the number of counter ticks elapsed .
// FIREBASE_PLATFORM_WINDOWS, FIREBASE_PLATFORM_LINUX