From: david Date: Tue, 12 Mar 2002 16:29:32 +0000 (+0000) Subject: Bind a new property, /sim/time/elapsed-ms, giving the number of X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d23c674846c74b514d7a7076d46434f83c503e2a;p=flightgear.git Bind a new property, /sim/time/elapsed-ms, giving the number of milliseconds elapsed since the simulation began. --- diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx index a65196ca9..0b0ca687b 100644 --- a/src/Main/fg_props.cxx +++ b/src/Main/fg_props.cxx @@ -454,6 +454,16 @@ setPilotPositionZOffset (float z) } +/** + * Return the number of milliseconds elapsed since simulation started. + */ +static long +getElapsedTime_ms () +{ + return globals->get_elapsed_time_ms(); +} + + /** * Return the current Zulu time. */ @@ -808,6 +818,7 @@ fgInitProps () fgTie("/sim/view/pilot/z-offset-m", getPilotPositionZOffset, setPilotPositionZOffset); fgSetArchivable("/sim/view/pilot/z-offset-m"); + fgTie("/sim/time/elapsed-ms", getElapsedTime_ms); fgTie("/sim/time/gmt", getDateString, setDateString); fgSetArchivable("/sim/time/gmt"); fgTie("/sim/time/gmt-string", getGMTString);