#include <timeinterval.hpp>
Public Member Functions | |
TimeInterval () | |
Default construtor. | |
TimeInterval (const timespec a, const timespec b) | |
Constructor with the timestamps a and b. | |
void | setInterval (const timespec a, const timespec b) |
Set the timespecs of an interval. | |
void | getInterval (timespec &a, timespec &b) const |
Get the timespecs of an interval. | |
void | measureA () |
Measures the first timestamp of the interval. | |
void | measureB () |
Measures the second timestamp of the interval. | |
timespec | getDifference () const |
Calculates delta between two timespecs. | |
int | compareDifference (const timespec &a) const |
Compares TimeInterval's delta with a timespec. | |
string | toString () const |
Converts a TimeInterval to a string. | |
Static Public Member Functions | |
int | compareTimespecs (const timespec &a, const timespec &b) |
Compares two timespecs. | |
timespec | addTimespecs (const timespec &a, const timespec &b) |
Add two timespecs. | |
timespec | subTimespecs (const timespec &a, const timespec &b) |
Subtracts two timespecs. | |
string | timespecToString (const timespec &a) |
Converts a timespec to a string. | |
Protected Attributes | |
timespec | interval [2] |
This is the basic method of measuring time for events in PTF.
Definition at line 30 of file timeinterval.hpp.
|
Default construtor. Definition at line 35 of file timeinterval.cpp. References interval. |
|
Constructor with the timestamps a and b. Definition at line 27 of file timeinterval.cpp. References interval. |
|
Add two timespecs.
Referenced by SimpleReactionHandler::handle(). |
|
Compares TimeInterval's delta with a timespec.
References getDifference(). Referenced by Parallel::output(), and Scheduler::wait(). Here is the call graph for this function: ![]() |
|
Compares two timespecs.
Referenced by SimpleReactionHandler::handle(). |
|
Calculates delta between two timespecs.
References interval. Referenced by compareDifference(), and Scheduler::schedule(). |
|
Get the timespecs of an interval.
References interval. Referenced by SimpleReactionHandler::handle(), and Task::Task(). |
|
Measures the first timestamp of the interval. Definition at line 63 of file timeinterval.cpp. References Clock::getClock(), Singleton< Clock >::getSingleton(), and interval. Referenced by Parallel::output(), SimulatedInputDevice::run(), InputDevice::run(), Scheduler::schedule(), and Scheduler::wait(). Here is the call graph for this function: ![]() |
|
Measures the second timestamp of the interval. Definition at line 70 of file timeinterval.cpp. References Clock::getClock(), Singleton< Clock >::getSingleton(), and interval. Referenced by Parallel::output(), SimulatedInputDevice::run(), InputDevice::run(), Scheduler::schedule(), and Scheduler::wait(). Here is the call graph for this function: ![]() |
|
Set the timespecs of an interval.
References interval. Referenced by Task::setReactionWindow(), and Task::Task(). |
|
Subtracts two timespecs.
Referenced by SimpleReactionHandler::handle(). |
|
Converts a timespec to a string.
Referenced by toString(). |
|
Converts a TimeInterval to a string.
References interval, and timespecToString(). Referenced by SimpleReactionHandler::handle(), InputDevice::run(), and Scheduler::schedule(). Here is the call graph for this function: ![]() |
|
Definition at line 32 of file timeinterval.hpp. Referenced by getDifference(), getInterval(), measureA(), measureB(), setInterval(), TimeInterval(), and toString(). |