diff options
Diffstat (limited to 'src/bin/ttyplay/timer.rs')
-rw-r--r-- | src/bin/ttyplay/timer.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/ttyplay/timer.rs b/src/bin/ttyplay/timer.rs index 6b3ec00..e8e4ce9 100644 --- a/src/bin/ttyplay/timer.rs +++ b/src/bin/ttyplay/timer.rs @@ -132,6 +132,12 @@ pub fn spawn_task( start_time = now - (now - start_time) * 2; } } + crate::event::TimerAction::DefaultSpeed => { + let now = std::time::Instant::now(); + start_time = now + - (((now - start_time) * 16) / playback_ratio); + playback_ratio = 16; + } crate::event::TimerAction::Quit => break, }, Res::TimerAction(Err(e)) => panic!("{}", e), |