diff options
author | oci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-01-19 18:23:54 +0000 |
---|---|---|
committer | oci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-01-19 18:23:54 +0000 |
commit | bf866ff95b78c58e6e05a86b97d89f646c6b6900 (patch) | |
tree | 8400f44ec23f635fd4b358fe3e2eba22df0a6b1e /ace/High_Res_Timer.i | |
parent | e41ccabd4ed1e1fbfe4a0f65b44372a3344c36a4 (diff) | |
download | ATCD-bf866ff95b78c58e6e05a86b97d89f646c6b6900.tar.gz |
Changes to support Green Hills Native x86 compiler.
Diffstat (limited to 'ace/High_Res_Timer.i')
-rw-r--r-- | ace/High_Res_Timer.i | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ace/High_Res_Timer.i b/ace/High_Res_Timer.i index 6fb562c6d80..d4338e83418 100644 --- a/ace/High_Res_Timer.i +++ b/ace/High_Res_Timer.i @@ -22,10 +22,15 @@ ACE_High_Res_Timer::hrtime_to_tv (ACE_Time_Value &tv, #if defined (ACE_WIN32) // Win32's scale factor is in ticks/msec, so multiply up to usec. ACE_hrtime_t subsec = hrt - tmp; // Remainder of ticks < 1sec - long msec = (long) (subsec / global_scale_factor ()); // #msec - long usec = (long) (subsec - (msec * global_scale_factor ())); - // (tick * usec/msec) / tick/msec = usec - usec = (usec * 1000) / (long) global_scale_factor (); + ACE_UINT32 msec = (ACE_UINT32) (subsec / global_scale_factor ()); // #msec + ACE_hrtime_t usec64 = subsec - (msec * global_scale_factor ()); +# if defined (ghs) + ACE_UINT32 usec = usec64.lo(); +# else + ACE_UINT32 usec = (ACE_UINT32) usec64; +# endif + // (tick * usec/msec) / tick/msec = usec + usec = (usec * 1000) / (ACE_UINT32) global_scale_factor (); tv.usec ((msec * 1000) + usec); #else tv.usec ((long) ((hrt - tmp) / global_scale_factor ())); |