Skip to content

activeDurationS — @gj-kit/expo-workouts

A public function from @gj-kit/expo-workouts/core. The signature below is taken directly from the 0.1.1 release declaration.

import { activeDurationS } from '@gj-kit/expo-workouts/core';
/**
* `(endMs - startMs - Σ pause overlap) / 1000`, clamped at 0. Overlapping pauses are merged, so
* double-counting is not expressible.
*
* ⚠ This is how ANDROID derives it. iOS reports the store's own `duration`, which honours the
* writer's explicit argument and can differ; `Workout.activeDurationS` carries whichever the
* platform gave.
*/
declare function activeDurationS(startMs: number, endMs: number, pauses: readonly Pause[]): number;

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/expo-workouts
  • Version: 0.1.1
  • Public entry: ./core
  • Source: GitHub