rs-suno 0.12.0

A download-only command-line tool for mirroring your Suno.ai library.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! The clock adapter: the engine's [`Clock`] port realised with the async
//! runtime's timer.

use std::future::Future;
use std::time::Duration;

use suno_core::Clock;

/// A clock that sleeps on the tokio runtime.
pub struct TokioClock;

impl Clock for TokioClock {
    fn sleep(&self, duration: Duration) -> impl Future<Output = ()> + Send {
        tokio::time::sleep(duration)
    }
}