|
Boost Users : |
From: fanzhe cui (fanzhe.cui_at_[hidden])
Date: 2007-06-08 00:38:19
I am not aware of such problem, and it seems the timer works ok. Please try
test with the test program in the library - testtimer.c. You might verify
what you observed.
Best regards,
Fanzhe Cui
Systems Architect
Goldiom Systems LLC
- Information and Communication Technology Provider
Email: fanzhe.cui_at_[hidden]
Tel: 973-210-4254
www.goldiom.com
-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Christian Henning
Sent: Thursday, June 07, 2007 10:24 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] port of GameDev SDL lib in Boost?
Hi there, I think there is something wrong with the timer. Whenever I
run the code ( see below ) it slows down for whatever reason. Is that
a known problem? When I look at the output the frequency is certainly
not 10 times a second.
#include <windows.h>
#include <iostream>
#include <sdl.h>
using namespace std;
Uint32 time_elapsed( Uint32 interval, void* param )
{
cout << interval << endl;
return ++interval;
}
int main( int argc, char* argv[] )
{
SDL_Init( SDL_INIT_VIDEO | SDL_INIT_TIMER );
SDL_TimerID id = SDL_AddTimer( 100, &time_elapsed, NULL );
SDL_Event event;
while( SDL_PollEvent( &event ) >= 0 ) { ::Sleep( 100 ); }
return 0;
}
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net