[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

win - linux

Michael Sgier

10/1/2008 5:52:00 AM

Hi
a question. I don't even understand the logic. ( What and where to
define etc. )

Impliment in a Linux environment the following related Win32 API function:

QueryPerformanceFrequency


No more than 4 lines of code and not outside of libc
Many thanks.
Regards Michael
7 Answers

red floyd

10/1/2008 6:06:00 AM

0

Michael Sgier wrote:
> Hi
> a question. I don't even understand the logic. ( What and where to
> define etc. )
>
> Impliment in a Linux environment the following related Win32 API function:
>
> QueryPerformanceFrequency

OT. Ask in a linux group. See FAQ 5.9
(http://www.parashift.com/c++-faq-lite/how-to-post.ht...)
>
>
> No more than 4 lines of code and not outside of libc

However, this little ridiculous requirement (which is probably damn near
impossible) leads me to refer you to FAQ 5.2.
(http://www.parashift.com/c++-faq-lite/how-to-post.ht...)


Michael Sgier

10/1/2008 9:57:00 AM

0

This is only for personal interest reasons. FAQ 5.2

It looks general C++ to me and I might not get an answer in an Linux
group. FAQ 5.9

Ioannis Vranos

10/1/2008 10:24:00 AM

0

Michael Sgier wrote:
> Hi
> a question. I don't even understand the logic. ( What and where to
> define etc. )
>
> Impliment in a Linux environment the following related Win32 API function:
>
> QueryPerformanceFrequency
>
>
> No more than 4 lines of code and not outside of libc
> Many thanks.
> Regards Michael


So you want to implement that function. Telling us what that function
does, would be helpful.

Ioannis Vranos

10/1/2008 10:36:00 AM

0

Michael Sgier wrote:
> Hi
> a question. I don't even understand the logic. ( What and where to
> define etc. )
>
> Impliment in a Linux environment the following related Win32 API function:
>
> QueryPerformanceFrequency
>
>
> No more than 4 lines of code and not outside of libc
> Many thanks.


Win32 API and libc are C libraries and not C++.


In any case, you had better ask in the following mailing list:
http://gcc.gnu.org/ml...

Ioannis Vranos

10/1/2008 10:38:00 AM

0

Ioannis Vranos wrote:
> Michael Sgier wrote:
>> Hi
>> a question. I don't even understand the logic. ( What and where to
>> define etc. )
>>
>> Impliment in a Linux environment the following related Win32 API
>> function:
>>
>> QueryPerformanceFrequency
>>
>>
>> No more than 4 lines of code and not outside of libc
>> Many thanks.
>
>
> Win32 API and libc are C libraries and not C++.
>
>
> In any case, you had better ask in the following mailing list:
> http://gcc.gnu.org/ml...


here:

http://gcc.gnu.org/lists.html...

jt

10/1/2008 11:52:00 AM

0

On Wed, 01 Oct 2008 11:57:03 +0200, Michael Sgier wrote:

[...]

> It looks general C++ to me

How so? Your question does not pertain to the C++ *language* (and in any
case the APIs in question are not even C++).

> and I might not get an answer in an Linux group

Where it might actually be on-topic...? You are much less likely to get
an answer here, I would have thought, since your query is obviously OT.

> FAQ 5.9

Quote: "Operating-specific questions (e.g., about Windows NT / 95 / 3.x,
UNIX, etc.) should go to an operating-system-specific newsgroup (see
below), not to comp.lang.c++."

--
Lionel B

Paavo Helde

10/1/2008 9:21:00 PM

0

Michael Sgier <sgier@nospam.com> kirjutas:

> Hi
> a question. I don't even understand the logic. ( What and where to
> define etc. )
>
> Impliment in a Linux environment the following related Win32 API
> function:
>
> QueryPerformanceFrequency

This would have been less off-topic if you had explained what the
QueryPerformanceFrequency() function is supposed to do.

Well, anyway implementing QueryPerformanceFrequency would not make much
sense if QueryPerformanceCounter had not been implemented first. In this
case it should become obvious how to implement it, they work tightly
together.

I also suggest to look up Boost date_time library, this should give
relatively portable means for working with timings. AFAIK it should be able
to give the microsecond or better resolution, if available on the platform.


hth
Paavo