#include <base_types.hh>
Public Types | |
| typedef int64 | Int |
Public Member Functions | |
| Seconds (void) | |
| Seconds (Int secs) | |
| operator Int () const | |
Private Attributes | |
| Int | mSeconds |
Friends | |
| Seconds | operator+ (const Seconds &a, const Seconds &b) |
| Seconds | operator- (const Seconds &a, const Seconds &b) |
/// Examples: /// Milliseconds(Second(secs)) // convert seconds to milliseconds /// /// Avoid explicit casting to int. If that's necessary, cast to typedef Int. /// Instead of casting to int to do arithmetic, cast to Milliseconds to use /// the operator() arithmetic methods. operator Int() can automatically /// produce an integer. /// /// int droppedFrames = int64(mMillisecFrame) / int64(mMillisecTimer) - 1; // BAD /// int droppedFrames = mMillisecFrame / mMillisecTimer - Milliseconds(1); // better /// Milliseconds t = Max( int(millisec1), int(millisec2) ); // BAD /// Milliseconds t = Max<Milliseconds::Int>( millisec1, millisec2 ); // better /// /// int64 was chosen to avoid overflow. uint64 wasn't chosen /// since there's a need to compute negative time units. ///
| typedef int64 base::Seconds::Int |
| base::Seconds::Seconds | ( | void | ) | [inline] |
| base::Seconds::Seconds | ( | Int | secs | ) | [inline] |
| base::Seconds::operator Int | ( | ) | const [inline] |
Int base::Seconds::mSeconds [private] |
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:20 2007