Tiny HTTP client layer on top of NetChat - and CTest support for some SimGear tests.
This commit is contained in:
@@ -104,3 +104,10 @@ void SGTimeStamp::stamp() {
|
||||
#endif
|
||||
}
|
||||
|
||||
int SGTimeStamp::elapsedMSec() const
|
||||
{
|
||||
SGTimeStamp now;
|
||||
now.stamp();
|
||||
|
||||
return static_cast<int>((now - *this).toMSecs());
|
||||
}
|
||||
|
||||
@@ -195,6 +195,10 @@ public:
|
||||
static SGTimeStamp now()
|
||||
{ SGTimeStamp ts; ts.stamp(); return ts; }
|
||||
|
||||
/**
|
||||
* elapsed time since the stamp was taken, in msec
|
||||
*/
|
||||
int elapsedMSec() const;
|
||||
private:
|
||||
SGTimeStamp(sec_type sec, nsec_type nsec)
|
||||
{ setTime(sec, nsec); }
|
||||
|
||||
Reference in New Issue
Block a user