ExperimentManager script class  1.1.0.1
The Experiment Manager script class reference.
Public Slots | Signals | List of all members
ExperimentTimer Class Reference

The ExperimentTimer class. More...

Inherits QObject.

Public Slots

double getElapsedTime ()
 See ExperimentTimer.getElapsedTimeInSec()
 
double getElapsedTimeInMicroSec ()
 Returns the elapsed time since the internal timer was started in micro-seconds. This function returns the elapsed time since the internal timer was started in micro-seconds, see ExperimentTimer.start(), ExperimentTimer.restart() and ExperimentTimer.stop(). More...
 
double getElapsedTimeInMilliSec ()
 Returns the elapsed time since the internal timer was started in milli-seconds. This function returns the elapsed time since the internal timer was started in milli-seconds, see ExperimentTimer.start(), ExperimentTimer.restart() and ExperimentTimer.stop(). More...
 
double getElapsedTimeInSec ()
 Returns the elapsed time since the internal timer was started in seconds. This function returns the elapsed time since the internal timer was started in seconds, see ExperimentTimer.start(), ExperimentTimer.restart() and ExperimentTimer.stop(). More...
 
void restart ()
 Restarts the internal timer in the ExperimentTimer that keeps track of the elapsed time. This function restarts the internal timer in the ExperimentTimer for keeping track of the elapsed time. See also ExperimentTimer.getElapsedTime(), ExperimentTimer.start(), ExperimentTimer.stop().
 
static bool SleepMSecAccurate (double mSecs)
 Makes the current thread go to sleep accurately for a specified amount of time. This function makes the current thread go to sleep accurately for a specified amount of provided time. More...
 
void start ()
 Starts the internal timer in the ExperimentTimer that keeps track of the elapsed time. This function starts the internal timer in the ExperimentTimer for keeping track of the elapsed time. See also ExperimentTimer.getElapsedTime(), ExperimentTimer.restart(), ExperimentTimer.stop().
 
void startTriggeredTimerLoop (double nIntervalTimeMSecs)
 Starts the ExperimentTimer at a periodic interval time. This function starts the Experiment Timer and then automatically emits a ExperimentTimer::triggeredTimerLoopInvoked() signal when it timed out.
! The ExperimentTimer implementation is non-threaded and takes place in the GUI thread, please consider to use the TriggerTimer TriggerTimer.startTimer() implementation for better results. More...
 
void stop ()
 Stops the internal timer in the ExperimentTimer that keeps track of the elapsed time. This function stops the internal timer in the ExperimentTimer for keeping track of the elapsed time. See also ExperimentTimer.getElapsedTime(), ExperimentTimer.restart(), ExperimentTimer.start().
 
void stopTriggeredTimerLoop ()
 Stops the running periodic interval thread from the ExperimentTimer. This function stops the running periodic interval thread from the ExperimentTimer, see ExperimentTimer.startTriggeredTimerLoop().
! The ExperimentTimer implementation is non-threaded and takes place in the GUI thread, please consider to use the TriggerTimer TriggerTimer.startTimer() implementation for better results.
 

Signals

void triggeredTimerLoopInvoked ()
 The timeout Signal. More...
 

Detailed Description

The ExperimentTimer class.

The ExperimentTimer can be used to create a accurate/fast triggered non-threaded (interval) timer for keeping track of the elapsed time.

Member Function Documentation

double ExperimentTimer::getElapsedTimeInMicroSec ( )
slot

Returns the elapsed time since the internal timer was started in micro-seconds. This function returns the elapsed time since the internal timer was started in micro-seconds, see ExperimentTimer.start(), ExperimentTimer.restart() and ExperimentTimer.stop().

Returns
a double value holding the elapsed time since the internal timer was started in micro-seconds.
double ExperimentTimer::getElapsedTimeInMilliSec ( )
slot

Returns the elapsed time since the internal timer was started in milli-seconds. This function returns the elapsed time since the internal timer was started in milli-seconds, see ExperimentTimer.start(), ExperimentTimer.restart() and ExperimentTimer.stop().

Returns
a double value holding the elapsed time since the internal timer was started in milli-seconds.
double ExperimentTimer::getElapsedTimeInSec ( )
slot

Returns the elapsed time since the internal timer was started in seconds. This function returns the elapsed time since the internal timer was started in seconds, see ExperimentTimer.start(), ExperimentTimer.restart() and ExperimentTimer.stop().

Returns
a double value holding the elapsed time since the internal timer was started in seconds.
bool ExperimentTimer::SleepMSecAccurate ( double  mSecs)
staticslot

Makes the current thread go to sleep accurately for a specified amount of time. This function makes the current thread go to sleep accurately for a specified amount of provided time.

Parameters
mSecsa double value determing the time in milli-seconds the thread should go to sleep.
Returns
a boolean value that determines whether the function executed successfully.
void ExperimentTimer::startTriggeredTimerLoop ( double  nIntervalTimeMSecs)
slot

Starts the ExperimentTimer at a periodic interval time. This function starts the Experiment Timer and then automatically emits a ExperimentTimer::triggeredTimerLoopInvoked() signal when it timed out.
! The ExperimentTimer implementation is non-threaded and takes place in the GUI thread, please consider to use the TriggerTimer TriggerTimer.startTimer() implementation for better results.

Parameters
nIntervalTimeMSecsa double value representing the period timeout time in milliseconds.
void ExperimentTimer::triggeredTimerLoopInvoked ( )
signal

The timeout Signal.

This signal is emitted automatically at each period time after the ExperimentTimer is started, see ExperimentTimer.startTriggeredTimerLoop().