improve seek algorithmic complexity O(n) -> O(log(n))
This commit is contained in:
@@ -134,10 +134,10 @@ impl PlaybackHead{
|
||||
}
|
||||
/// Set the playback head position to new_time.
|
||||
#[wasm_bindgen]
|
||||
pub fn set_head_time(&mut self,time:f64,new_time:f64){
|
||||
pub fn set_head_time(&mut self,bot:&CompleteBot,time:f64,new_time:f64){
|
||||
let time=time::from_float(time).unwrap();
|
||||
let new_time=time::from_float(new_time).unwrap();
|
||||
self.head.set_time(time,new_time);
|
||||
self.head.set_time(&bot.bot,time,new_time);
|
||||
}
|
||||
#[wasm_bindgen]
|
||||
pub fn get_run_time(&self,bot:&CompleteBot,time:f64,mode_id:u32)->Option<f64>{
|
||||
|
||||
Reference in New Issue
Block a user