Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Appendix: Implementation Notes

Which APIs have been chosen to implement each clock on each platform?

The following table presents a resume of which API is used for each clock on each platform

Table 1.4. Clock API correspondence

Clock

Windows Platform

Posix Platform

Mac Platform

system_clock

GetSystemTimeAsFileTime

clock_gettime( CLOCK_REALTIME)

gettimeofday

steady_clock

QueryPerformanceCounter and QueryPerformanceFrequency

clock_gettime( CLOCK_STEADY)

mach_timebase_info,mach_absolute_time

process_real_cpu_clock

GetProcessTimes

times

times

process_system_cpu_clock

GetProcessTimes

times

times

process_user_cpu_clock

GetProcessTimes

times

times

process_cpu_clock

GetProcessTimes

times

times

thread_clock

GetThreadTimes

clock_gettime(pthread_getcpuclockid)

clock_gettime(pthread_getcpuclockid)



PrevUpHomeNext