diff --git a/src/editor/PlaySession.ts b/src/editor/PlaySession.ts index 17bfcbce..4ea45351 100644 --- a/src/editor/PlaySession.ts +++ b/src/editor/PlaySession.ts @@ -322,7 +322,7 @@ export class PlaySession { if (steady && !this.state.paused) return ( `Recording "${steady.name}" not in real time: ${steady.seconds.toFixed(1)} s of video, ` + - `${steady.slower.toFixed(1)}x real time · Esc stops` + `${steady.speed.toFixed(2)}x real time · Esc stops` ); if (this.state.paused) { const why = this.breakAt === null ? 'Paused' : `Break in ${this.breakAt}`; diff --git a/src/viewport/GameRecorder.ts b/src/viewport/GameRecorder.ts index 091b5464..6e278e9a 100644 --- a/src/viewport/GameRecorder.ts +++ b/src/viewport/GameRecorder.ts @@ -115,14 +115,14 @@ export class GameRecorder implements RecordingSink { } /** - * How far a recording not in real time has got (#423): seconds of video, and how many times - * longer it took; null while none records. + * How far a recording not in real time has got (#423): seconds of video, and its speed, seconds + * of video per second it took (0.2 is five times slower than real time); null while none records. */ - steadyPace(): { name: string; seconds: number; slower: number } | null { + steadyPace(): { name: string; seconds: number; speed: number } | null { const info = this.take?.info(); if (!info || info.realTime || info.state !== 'recording') return null; const seconds = info.durationMs / 1000; - return { name: info.name, seconds, slower: seconds > 0 ? info.tookMs / info.durationMs : 0 }; + return { name: info.name, seconds, speed: info.tookMs > 0 ? info.durationMs / info.tookMs : 0 }; } stop(): string { diff --git a/src/viewport/RecordingTake.ts b/src/viewport/RecordingTake.ts index 32f21479..6bf79f81 100644 --- a/src/viewport/RecordingTake.ts +++ b/src/viewport/RecordingTake.ts @@ -588,14 +588,14 @@ export class Take { this.tellPace(); } - /** How much slower than real time a recording not in real time was made (#423). */ + /** How fast a recording not in real time was made (#423): seconds of video per second it took. */ private tellPace(): void { const pace = this.steady; - if (!pace || pace.seconds <= 0) return; const took = this.tookMs / 1000; + if (!pace || pace.seconds <= 0 || took <= 0) return; this.host.log( `Recording "${this.name}" took ${took.toFixed(1)} s for ${pace.seconds.toFixed(1)} s of video, ` + - `${(took / pace.seconds).toFixed(1)}x real time, and has every frame`, + `${(pace.seconds / took).toFixed(2)}x real time, and has every frame`, 'info', ); }