Bind a new property, /sim/time/elapsed-ms, giving the number of
milliseconds elapsed since the simulation began.
This commit is contained in:
parent
c22018db05
commit
d23c674846
1 changed files with 11 additions and 0 deletions
|
@ -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.
|
* Return the current Zulu time.
|
||||||
*/
|
*/
|
||||||
|
@ -808,6 +818,7 @@ fgInitProps ()
|
||||||
fgTie("/sim/view/pilot/z-offset-m",
|
fgTie("/sim/view/pilot/z-offset-m",
|
||||||
getPilotPositionZOffset, setPilotPositionZOffset);
|
getPilotPositionZOffset, setPilotPositionZOffset);
|
||||||
fgSetArchivable("/sim/view/pilot/z-offset-m");
|
fgSetArchivable("/sim/view/pilot/z-offset-m");
|
||||||
|
fgTie("/sim/time/elapsed-ms", getElapsedTime_ms);
|
||||||
fgTie("/sim/time/gmt", getDateString, setDateString);
|
fgTie("/sim/time/gmt", getDateString, setDateString);
|
||||||
fgSetArchivable("/sim/time/gmt");
|
fgSetArchivable("/sim/time/gmt");
|
||||||
fgTie("/sim/time/gmt-string", getGMTString);
|
fgTie("/sim/time/gmt-string", getGMTString);
|
||||||
|
|
Loading…
Add table
Reference in a new issue