[Balug-talk] Millisecond timeclock
brian_sroufek at msdesigninc.com
Thu Aug 2 11:41:53 PDT 2001
I've recently done the same work.
I acquired the appropriate calls by a knowledge
base Search in Microsoft 32 API().
The best way I have found to address this wicked
time portability issue is to write your own time
function with uses:
#elif defined M_UNIX
to make the appropriate calls for your particular
Note that I have my own macros defined which I
define in a standard header so that my code doesn't
have to change with every release.
P.S.: I'll look in my code for the specific code.
Rick Moen wrote:
> begin Gern Blandsden quotation:
> > I'm doing some porting from Win32 to Linux that uses
> > PWLib as the framework. The system requires a
> > reliable timeclock that reports with millisecond
> > precision. In Win32, one uses timeGetTime() to get
> > the time from the multimedia timeclock -- a clock far
> > more acurate than the regular system timeclock.
> > But I can't seem to find an equivalent for the Win32
> > timeGetTime() call.
> I'm not sure it's realistic to measure time at the millisecond level on
> other than a real-time OS. Neither the Win32 OSes nor regular Linux
> qualifies -- though there are real-time Linux variants that do (and
> there's an unofficial kernel patch that purports to reduce system-time
> latency down to around the 4 msec level:
> If a Win32 system call purports to measure reliably to that level of
> granularity, I'd suggest that it speaks with forked tongue.
> But anyway, returning to Linux, you might want to look into gettimeofday(2).
> Cheers, "Transported to a surreal landscape, a young girl kills the first
> Rick Moen woman she meets, and then teams up with three complete strangers
> rick at linuxmafia.com to kill again." -- Rick Polito's That TV Guy column,
> describing the movie _The Wizard of Oz_
> Balug-talk mailing list
> Balug-talk at balug.org
More information about the Balug-talk-balug.org