File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -117,20 +117,23 @@ export function FlightLog(logData) {
117117 * Get the earliest time seen in the log of the given index (in microseconds), or leave off the logIndex
118118 * argument to fetch details for the current log.
119119 */
120- this . getMinTime = function ( ) {
121- return logIndexes . getIntraframeDirectory ( logIndex ) . minTime ;
120+ this . getMinTime = function ( index ) {
121+ index = index ?? logIndex ;
122+ return logIndexes . getIntraframeDirectory ( index ) . minTime ;
122123 } ;
123124
124125 /**
125126 * Get the latest time seen in the log of the given index (in microseconds), or leave off the logIndex
126127 * argument to fetch details for the current log.
127128 */
128- this . getMaxTime = function ( ) {
129- return logIndexes . getIntraframeDirectory ( logIndex ) . maxTime ;
129+ this . getMaxTime = function ( index ) {
130+ index = index ?? logIndex ;
131+ return logIndexes . getIntraframeDirectory ( index ) . maxTime ;
130132 } ;
131133
132- this . getActualLoggedTime = function ( ) {
133- const directory = logIndexes . getIntraframeDirectory ( logIndex ) ;
134+ this . getActualLoggedTime = function ( index ) {
135+ index = index ?? logIndex ;
136+ const directory = logIndexes . getIntraframeDirectory ( index ) ;
134137 return directory . maxTime - directory . minTime - directory . unLoggedTime ;
135138 } ;
136139
You can’t perform that action at this time.
0 commit comments