mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
simplify time traits
This commit is contained in:
parent
ad2f75bee6
commit
66f9afe500
7 changed files with 151 additions and 165 deletions
|
|
@ -401,7 +401,7 @@ impl PhrasePlayer {
|
|||
pub fn samples_since_start (&self) -> Option<usize> {
|
||||
self.phrase.as_ref()
|
||||
.map(|(started,_)|started.sample())
|
||||
.map(|started|started - self.clock.sample())
|
||||
.map(|started|started - self.clock.instant.sample())
|
||||
}
|
||||
pub fn playing_phrase (&self) -> Option<(usize, Arc<RwLock<Phrase>>)> {
|
||||
if let (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue