Free Electron
|
Classes | |
class | fe::SystemTicker |
High precision timer. More... | |
class | fe::DL_Loader |
Raw access to a dynamic library. More... | |
class | fe::Exception |
Generic exception carrying a fe::String payload. More... | |
class | fe::String |
Automatically reference-counted string container. More... | |
class | fe::System |
System call wrappers. More... | |
class | fe::UnitTest |
Counts success and failures in a style similar to assertions. More... | |
Enumerations | |
enum | fe::Result { e_ok =0x00000000, e_cancel, e_poison, e_alreadyAvailable, e_notNeeded, e_undefinedFailure =FE_FAILURE, e_unsupported, e_refused, e_outOfMemory, e_invalidFile, e_invalidHandle, e_invalidPointer, e_invalidRange, e_notInitialized, e_cannotChange, e_aborted, e_writeFailed, e_readFailed, e_cannotFind, e_cannotCreate, e_unsolvable, e_impossible, e_usage, e_system, e_typeMismatch, e_corrupt } |
Generalized return value indicating success or failure, and why. More... | |
Functions | |
void | fe::milliSleep (long milliseconds) |
Sleep the current process for the given number of milliseconds. More... | |
void | fe::microSleep (long microseconds) |
Sleep the current process for the given number of microseconds. More... | |
void | fe::minimumSleep (long microseconds=1) |
Sleep the current process for the given number of microseconds or the minimum that the OS can resolve, whichever is larger. More... | |
void | fe::nanoSpin (long nanoseconds) |
Delay the current thread for the given number of nanoseconds. More... | |
BWORD | fe::successful (Result result) |
Returns TRUE if the result value indicates a success. More... | |
BWORD | fe::failure (Result result) |
Returns TRUE if the result value indicates a failure. More... | |
const char * | fe::resultString (Result result) |
Return a string for a result code. More... | |
String | fe::errorString (int errnum) |
Return a string for an FE_ERRNO code. More... | |
unsigned long | fe::systemTick (void) |
Sleep the current thread for the given number of seconds and nanoseconds. More... | |
unsigned long | fe::systemMicroseconds (void) |
Get the high precision microsecond timer. More... | |
enum fe::Result |
Generalized return value indicating success or failure, and why.
The functions fe::succeeded and fe::failed can quickly determine which category the result belongs to.
FE_DL_PUBLIC String fe::errorString | ( | int | error | ) |
Return a string for an FE_ERRNO code.
Referenced by fe::ext::DrawOpenGL::flush().
|
inline |
Returns TRUE if the result value indicates a failure.
Referenced by fe::ext::ConnectedCatalog::flush(), fe::StateCatalog::getState(), fe::StateCatalog::getStateUnsafe(), fe::StateCatalog::getTypeName(), fe::StateCatalog::getTypeNameUnsafe(), fe::ext::ConnectedCatalog::lockAfterUpdate(), fe::StateCatalog::overlayState(), fe::ext::ConnectedCatalog::preGet(), fe::StateCatalog::removeState(), fe::StateCatalog::setState(), and beacon::GlobalDictionary::start().
void FE_DL_EXPORT fe::microSleep | ( | long | microseconds | ) |
Sleep the current process for the given number of microseconds.
This can sleep all the threads for the process.
References fe::milliSleep().
Referenced by fe::minimumSleep().
void FE_DL_EXPORT fe::milliSleep | ( | long | milliseconds | ) |
Sleep the current process for the given number of milliseconds.
This can sleep all the threads for the process.
Referenced by fe::microSleep(), and fe::ext::QuickViewer::run().
void FE_DL_EXPORT fe::minimumSleep | ( | long | microseconds = 1 | ) |
Sleep the current process for the given number of microseconds or the minimum that the OS can resolve, whichever is larger.
This can sleep all the threads for the process.
References fe::microSleep().
void FE_DL_EXPORT fe::nanoSpin | ( | long | nanoseconds | ) |
Delay the current thread for the given number of nanoseconds.
This function may involve an active polling of clock ticks.
This should not sleep other threads.
FE_DL_EXPORT const char * fe::resultString | ( | Result | result | ) |
Return a string for a result code.
|
inline |
Returns TRUE if the result value indicates a success.
|
inline |
Get the high precision microsecond timer.
This is a convenience function utilizing fe::systemTick(). You must call fe::SystemTicker::calibrate() once prior to use.
References fe::SystemTicker::microsecondsPerTick(), and fe::systemTick().
|
inline |
Sleep the current thread for the given number of seconds and nanoseconds.
This should not sleep other threads. Yield the current thread
This should not yield other threads.
Get the high precision tick count from the processor
See fe::SystemTicker for utilities and interpreted results, including calibration.
Referenced by fe::systemMicroseconds().