WLJS LogoWLJS Notebook

Duration

Duration[expr] returns the duration of expr.

Duration[expr, unit] returns the result in the specified unit.

Examples

Get the duration of an audio object:

audio = ExampleData[{"Audio", "Apollo11SmallStep"}];
Duration[audio]
(* 5.4 seconds *)

Get duration in a specific unit:

Duration[audio, "Milliseconds"]
(* 5400. *)

Please visit the official Wolfram Language Reference for more details.

On this page