Problem with gettimeofday / using QTime.currentTime ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with gettimeofday / using QTime.currentTime ?

lasconic
Administrator
Today I tried to compile on windows with the last qt sdk 2009.02 from nokia.
I use the mingw shipped with Qt as stated in the tutorial I wrote :
http://www.musescore.org/en/node/1479
As stated by yingdat on the forum :
http://www.musescore.org/en/node/1592#comment-3608 there are some
problems with gettimeofday in utils.cpp.
As far as I understand the time.h included in mingw shipped with
2009.02 is different from the one shipped with 2009.01 ...
I took a closer look to utils.cpp, the faulting function is curTime(),
it uses some preprocessor command and uses "gettimeofday" on windows
and apple but "clock_gettime" for windows.
I wonder if we can't use QTime
(http://doc.trolltech.com/4.5/qtime.html#currentTime) and get ride of
gettimeofday ? any precision problem ?
I will try :)

Lasconic

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: Problem with gettimeofday / using QTime.currentTime ?

wschweer
Administrator
Its a precision problem. curTime() is used to schedule midi events and the
resolution should be <= 1msec. QTime uses the os tick counter and for linux
you may only get a resolution of 20msec, depending on kernel (compile-time)
parameters. gettimeofday has usec resolution which should result in sample
accurate timings.

On Friday 08 May 2009 11:33:00 Lasconic wrote:

> Today I tried to compile on windows with the last qt sdk 2009.02 from
> nokia. I use the mingw shipped with Qt as stated in the tutorial I wrote :
> http://www.musescore.org/en/node/1479
> As stated by yingdat on the forum :
> http://www.musescore.org/en/node/1592#comment-3608 there are some
> problems with gettimeofday in utils.cpp.
> As far as I understand the time.h included in mingw shipped with
> 2009.02 is different from the one shipped with 2009.01 ...
> I took a closer look to utils.cpp, the faulting function is curTime(),
> it uses some preprocessor command and uses "gettimeofday" on windows
> and apple but "clock_gettime" for windows.
> I wonder if we can't use QTime
> (http://doc.trolltech.com/4.5/qtime.html#currentTime) and get ride of
> gettimeofday ? any precision problem ?
> I will try :)
>
> Lasconic
>
> ---------------------------------------------------------------------------
>--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700 Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Mscore-developer mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/mscore-developer



------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: Problem with gettimeofday / using QTime.currentTime ?

lasconic
Administrator
Ok, thanks for the info.
I found a good post here
:http://www.halcode.com/archives/2008/08/26/retrieving-system-time-gettimeofday/
I append the code it gives in time.h. I'm compiling. We'll see.
I have a lot of warning for qtscript binding too. A lot more than with Qt4.5.0.
Things like
QTextOption::setTabStop(qreal)' is declared as dllimport: attribute ignored.

2009/5/8 Werner Schweer <[hidden email]>:

> Its a precision problem. curTime() is used to schedule midi events and the
> resolution should be <= 1msec. QTime uses the os tick counter and for linux
> you may only get a resolution of 20msec, depending on kernel (compile-time)
> parameters. gettimeofday has usec resolution which should result in sample
> accurate timings.
>
> On Friday 08 May 2009 11:33:00 Lasconic wrote:
>> Today I tried to compile on windows with the last qt sdk 2009.02 from
>> nokia. I use the mingw shipped with Qt as stated in the tutorial I wrote :
>> http://www.musescore.org/en/node/1479
>> As stated by yingdat on the forum :
>> http://www.musescore.org/en/node/1592#comment-3608 there are some
>> problems with gettimeofday in utils.cpp.
>> As far as I understand the time.h included in mingw shipped with
>> 2009.02 is different from the one shipped with 2009.01 ...
>> I took a closer look to utils.cpp, the faulting function is curTime(),
>> it uses some preprocessor command and uses "gettimeofday" on windows
>> and apple but "clock_gettime" for windows.
>> I wonder if we can't use QTime
>> (http://doc.trolltech.com/4.5/qtime.html#currentTime) and get ride of
>> gettimeofday ? any precision problem ?
>> I will try :)
>>
>> Lasconic
>>
>> ---------------------------------------------------------------------------
>>--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>> i700 Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> Mscore-developer mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/mscore-developer
>
>
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Mscore-developer mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/mscore-developer
>

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer