Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/chrono.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -7745,7 +7745,7 @@ This operator is convenient for computing where in a time frame a given duration
The following table presents a resume of which API is used for each clock on each platform
[table Clock API correspondence
[[Clock] [Windows Platform] [Posix Platform] [Mac Platform] ]
[[__system_clock] [GetSystemTimeAsFileTime] [clock_gettime( CLOCK_REALTIME)] [gettimeofday] ]
[[__system_clock] [GetSystemTimePreciseAsFileTime ] [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] ]
Expand Down
4 changes: 2 additions & 2 deletions example/runtime_resolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ namespace
{
FILETIME ft;
#if defined(UNDER_CE)
// Windows CE does not define GetSystemTimeAsFileTime so we do it in two steps.
// Windows CE does not define GetSystemTimePreciseAsFileTime so we do it in two steps.
SYSTEMTIME st;
::GetSystemTime( &st );
::SystemTimeToFileTime( &st, &ft );
#else
::GetSystemTimeAsFileTime( &ft ); // never fails
::GetSystemTimePreciseAsFileTime ( &ft ); // never fails
#endif
long long t = (static_cast<long long>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
# if !defined( BOOST_MSVC ) || BOOST_MSVC > 1300 // > VC++ 7.0
Expand Down
2 changes: 1 addition & 1 deletion example/time2_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace
int gettimeofday(struct timeval * tp, void *)
{
FILETIME ft;
::GetSystemTimeAsFileTime( &ft ); // never fails
::GetSystemTimePreciseAsFileTime ( &ft ); // never fails
long long t = (static_cast<long long>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
# if !defined( BOOST_MSVC ) || BOOST_MSVC > 1300 // > VC++ 7.0
t -= 116444736000000000LL;
Expand Down
4 changes: 2 additions & 2 deletions example/timeval_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ namespace
{
FILETIME ft;
#if defined(UNDER_CE)
// Windows CE does not define GetSystemTimeAsFileTime so we do it in two steps.
// Windows CE does not define GetSystemTimePreciseAsFileTime so we do it in two steps.
SYSTEMTIME st;
::GetSystemTime( &st );
::SystemTimeToFileTime( &st, &ft );
#else
::GetSystemTimeAsFileTime( &ft ); // never fails
::GetSystemTimePreciseAsFileTime ( &ft ); // never fails
#endif
long long t = (static_cast<long long>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
# if !defined( BOOST_MSVC ) || BOOST_MSVC > 1300 // > VC++ 7.0
Expand Down
4 changes: 2 additions & 2 deletions include/boost/chrono/detail/inlined/win/chrono.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ namespace chrono_detail
system_clock::time_point system_clock::now() BOOST_NOEXCEPT
{
boost::winapi::FILETIME_ ft;
boost::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
boost::winapi::GetSystemTimePreciseAsFileTime ( &ft ); // never fails
return system_clock::time_point(
system_clock::duration(
((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
Expand All @@ -115,7 +115,7 @@ namespace chrono_detail
system_clock::time_point system_clock::now( system::error_code & ec )
{
boost::winapi::FILETIME_ ft;
boost::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
boost::winapi::GetSystemTimePreciseAsFileTime ( &ft ); // never fails
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
Expand Down