X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Ftiming%2Ftimestamp.cxx;h=83eff2fc10ea485c8039634132b958f1ac866cef;hb=33970663435dd1a12941b017739285341205acf4;hp=bfed66446da1df1c972c6c84e94c365f90d4546c;hpb=ad667be0d7100670ecc0a274ae8c567749ef0add;p=simgear.git diff --git a/simgear/timing/timestamp.cxx b/simgear/timing/timestamp.cxx index bfed6644..83eff2fc 100644 --- a/simgear/timing/timestamp.cxx +++ b/simgear/timing/timestamp.cxx @@ -104,3 +104,10 @@ void SGTimeStamp::stamp() { #endif } +int SGTimeStamp::elapsedMSec() const +{ + SGTimeStamp now; + now.stamp(); + + return static_cast((now - *this).toMSecs()); +}