#include <timestamp.hxx>
Public Member Functions | |
| SGTimeStamp () | |
| Default constructor. | |
| SGTimeStamp (const long s, const long m) | |
| This creates an instance of the SGTimeStamp object. | |
| void | stamp () |
| Update stored time to current time (seconds and microseconds). | |
| long | get_seconds () const |
| long | get_usec () const |
Friends | |
| SGTimeStamp | operator+ (const SGTimeStamp &t, const long &m) |
| Increment the saved time by the specified number of microseconds. | |
| long | operator- (const SGTimeStamp &a, const SGTimeStamp &b) |
| Subtract two time stamps returning the difference in microseconds. | |
)
The SGTimeStamp is useful for tracking the elapsed time of various events in your program. You can also use it to keep constistant motion across varying frame rates.
Definition at line 54 of file timestamp.hxx.
| SGTimeStamp::SGTimeStamp | ( | const long | s, | |
| const long | m | |||
| ) | [inline] |
This creates an instance of the SGTimeStamp object.
When calling the constructor you may provide initial seconds an microseconds values.
| s | initial seconds value | |
| m | initial microseconds value |
Definition at line 107 of file timestamp.hxx.
| long SGTimeStamp::get_seconds | ( | ) | const [inline] |
| long SGTimeStamp::get_usec | ( | ) | const [inline] |
| SGTimeStamp operator+ | ( | const SGTimeStamp & | t, | |
| const long & | m | |||
| ) | [friend] |
Increment the saved time by the specified number of microseconds.
| t | time stamp | |
| m | microseconds increment |
Definition at line 86 of file timestamp.cxx.
| long operator- | ( | const SGTimeStamp & | a, | |
| const SGTimeStamp & | b | |||
| ) | [friend] |
Subtract two time stamps returning the difference in microseconds.
| a | timestamp 1 | |
| b | timestame 2 |
Definition at line 92 of file timestamp.cxx.
1.5.6