Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Ability to access duration since stream started in StreamInstants

Abierto
#440 3 comentarios 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rust

Línea de trabajo

Read the StreamInstants and InputStreamTimestamp definitions and their tests to see how stream timing is represented and which duration operations are exposed. Compare the three proposed API options against existing conventions; done means enabling access to elapsed time since stream start with an agreed public API and adding coverage for it.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hello,

I'm attempting to get the timing information returned from the InputStreamTimestamp. The StreamInstants only appears to have methods for getting the Duration since another StreamInstant or for adding and subtracting other Durations.

I would like to find a way to access the duration since the stream started, but it doesn't appear that that is possible with the currently provided methods. If there is another approach that I am missing, I would be extremely grateful for an example.

There are three approaches that would fit my use case and I would be happy to submit a PR if any are acceptable.

  1. Make secs and nanos public.
  2. Make as_nanos(&self) public
  3. Make a new pub fn duration_since_stream_start(&self) -> Duration or some variation of

I appreciate your time and look forward to discussing this further.

Lenguaje dominante
Rust
Estrellas
4k
Forks
554
Merge medio
3 d 3 h
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de RustAudio/cpal

Todos los issues de RustAudio/cpal

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.