[Ace-users] Help: about the ACE high resolution timer on Windows

zmike03 at gmail.com zmike03 at gmail.com
Thu Jan 17 23:53:35 CST 2008

Hi, everyone,

I want to get the system time in 1 millisecond resolution,
and present it in the broken-down time format, e.g. like this:
month/day/year, hour::min::sec.millisecond.

But I just cannot find out a way that I can do it with ACE on the
Windows platform.

Here is my problem:

The ACE_OS::localtime() can give me a broken-down time format (to the
but then I can calculate the millisecond part) as long as I
can pass in seconds elapsed from the (Unix) Epoch. But how do I get
the "seconds elapsed
from the Epoch"? -- the "seconds elapsed" must be measured with the 1
msec resolution.

The ACE_High_Res_Timer::gettimeofday_hr() does not return the seconds
from that Epoch, am I right? so I cannot directly use its result.

Are there any ACE classes/functions that I can directly use to achieve
my goal here?
Or any additional code I need to write?

Thanks in advance!

Assume the platform my code runs on is Windows and it supports high
performance time with 1 millisecond resolution.

More information about the Ace-users mailing list