Loading...
Searching...
No Matches
Public Member Functions | List of all members
Thread::RealtimeOptions Struct Reference

A selection of options available when creating realtime threads. More...

Public Member Functions

RealtimeOptions withPriority (int newPriority) const
 A value with a range of 0-10, where 10 is the highest priority.
 
RealtimeOptions withProcessingTimeMs (double newProcessingTimeMs) const
 Specify the expected amount of processing time required each time the thread wakes up.
 
RealtimeOptions withMaximumProcessingTimeMs (double newMaximumProcessingTimeMs) const
 Specify the maximum amount of processing time required each time the thread wakes up.
 
RealtimeOptions withPeriodMs (double newPeriodMs) const
 Specify the approximate amount of time between each thread wake up.
 
RealtimeOptions withPeriodHz (double newPeriodHz) const
 Specify the approximate frequency at which the thread will be woken up.
 
int getPriority () const
 Returns a value with a range of 0-10, where 10 is the highest priority.
 
std::optional< double > getProcessingTimeMs () const
 Returns the expected amount of processing time required each time the thread wakes up.
 
std::optional< double > getMaximumProcessingTimeMs () const
 Returns the maximum amount of processing time required each time the thread wakes up.
 
std::optional< double > getPeriodMs () const
 Returns the approximate amount of time between each thread wake up, or nullopt if there is no inherent periodicity.
 

Detailed Description

A selection of options available when creating realtime threads.

See also
startRealtimeThread

Member Function Documentation

◆ withPriority()

RealtimeOptions Thread::RealtimeOptions::withPriority ( int  newPriority) const

A value with a range of 0-10, where 10 is the highest priority.

Currently only used by Posix platforms.

See also
getPriority

References isPositiveAndNotGreaterThan(), jassert, and withMember().

◆ withProcessingTimeMs()

RealtimeOptions Thread::RealtimeOptions::withProcessingTimeMs ( double  newProcessingTimeMs) const

Specify the expected amount of processing time required each time the thread wakes up.

Only used by macOS/iOS.

See also
getProcessingTimeMs, withMaximumProcessingTimeMs, withPeriodMs, withPeriodHz

References jassert, and withMember().

◆ withMaximumProcessingTimeMs()

RealtimeOptions Thread::RealtimeOptions::withMaximumProcessingTimeMs ( double  newMaximumProcessingTimeMs) const

Specify the maximum amount of processing time required each time the thread wakes up.

Only used by macOS/iOS.

See also
getMaximumProcessingTimeMs, withProcessingTimeMs, withPeriodMs, withPeriodHz

References jassert, and withMember().

◆ withPeriodMs()

RealtimeOptions Thread::RealtimeOptions::withPeriodMs ( double  newPeriodMs) const

Specify the approximate amount of time between each thread wake up.

Alternatively call withPeriodHz().

Only used by macOS/iOS.

See also
getPeriodMs, withPeriodHz, withProcessingTimeMs, withMaximumProcessingTimeMs,

References jassert, and withMember().

◆ withPeriodHz()

RealtimeOptions Thread::RealtimeOptions::withPeriodHz ( double  newPeriodHz) const

Specify the approximate frequency at which the thread will be woken up.

Alternatively call withPeriodMs().

Only used by macOS/iOS.

See also
getPeriodHz, withPeriodMs, withProcessingTimeMs, withMaximumProcessingTimeMs,

References jassert.

◆ getPriority()

int Thread::RealtimeOptions::getPriority ( ) const

Returns a value with a range of 0-10, where 10 is the highest priority.

See also
withPriority

◆ getProcessingTimeMs()

std::optional< double > Thread::RealtimeOptions::getProcessingTimeMs ( ) const

Returns the expected amount of processing time required each time the thread wakes up.

See also
withProcessingTimeMs, getMaximumProcessingTimeMs, getPeriodMs

◆ getMaximumProcessingTimeMs()

std::optional< double > Thread::RealtimeOptions::getMaximumProcessingTimeMs ( ) const

Returns the maximum amount of processing time required each time the thread wakes up.

See also
withMaximumProcessingTimeMs, getProcessingTimeMs, getPeriodMs

◆ getPeriodMs()

std::optional< double > Thread::RealtimeOptions::getPeriodMs ( ) const

Returns the approximate amount of time between each thread wake up, or nullopt if there is no inherent periodicity.

See also
withPeriodMs, withPeriodHz, getProcessingTimeMs, getMaximumProcessingTimeMs

The documentation for this struct was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram