Re: System Timer

Ted Felix <ted-Ll1PANez7xxWk0Htik3J/[email protected]>
Newsgroups gmane.comp.audio.rosegarden.user
Message-ID <[email protected]>
On 5/19/22 4:40 PM, Will Godfrey wrote:
> Just a matter of curiosity, but what exactly does Rosegarden use as the system
> timer?
> Is it a direct count of something like get_time_of_day or is it a re-triggered
> soft timer?
> ... or something else entirely?

   Rosegarden uses many different kind of timers depending on the 
situation.  QTimer is used frequently in the UI.  See 
RosegardenMainWindow::m_updateUITimer.  That's an OS-driven callback 
timer.  Very convenient.

   There is also at least one sleep() loop related to the sequencer. 
See SequencerThread::run().  That uses QElapsedTime to get time.

   Then internally, ALSA has its own timer which you can select in the 
preferences.  That's the one that most likely generates and uses 
timestamps.  Probably from some relatively high-resolution (millisecond) 
Linux "get time" call.  I've not dug very far into that side of things.

Ted.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.