summaryrefslogtreecommitdiff
path: root/ace/High_Res_Timer.h
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2000-09-20 17:08:40 +0000
committerSteve Huston <shuston@riverace.com>2000-09-20 17:08:40 +0000
commit79ad6e5a1e8168e0cb2c4bc2f62997cf07807c1a (patch)
tree684b91c497cad3c9b2126ec02a9c462c3943de92 /ace/High_Res_Timer.h
parent9ceacb0c8df6d5db1a04411b4c95da26269d7eab (diff)
downloadATCD-79ad6e5a1e8168e0cb2c4bc2f62997cf07807c1a.tar.gz
ChangeLogTag:Wed Sep 20 12:55:16 2000 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ace/High_Res_Timer.h')
-rw-r--r--ace/High_Res_Timer.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/ace/High_Res_Timer.h b/ace/High_Res_Timer.h
index ae3d4793ec1..608ed3dea55 100644
--- a/ace/High_Res_Timer.h
+++ b/ace/High_Res_Timer.h
@@ -81,6 +81,17 @@ public:
static ACE_UINT32 global_scale_factor (void);
// Returns the global_scale_factor.
+ // On Win32, QueryPerformanceFrequency is used as a base for the global
+ // scale factor. The value this returns is often too small to be usefully
+ // converted to "ticks"/second - it loses unacceptably high levels of
+ // precision. So on Win32, global_scale_factor_ is in ticks/msec, not
+ // ticks/usec as on all others.
+#if defined (ACE_WIN32)
+# define ACE_HR_SCALE_CONVERSION (ACE_ONE_SECOND_IN_MSECS)
+#else
+# define ACE_HR_SCALE_CONVERSION (ACE_ONE_SECOND_IN_USECS)
+#endif /* ACE_WIN32 */
+
static int get_env_global_scale_factor (const ACE_TCHAR *env
= ACE_TEXT ("ACE_SCALE_FACTOR"));
// Sets the global_scale_factor to the value in the <env>