Skip to content

Profectus / data/common / estimateTime

Function: estimateTime() ​

estimateTime(resource, rate, target): ComputedRef<string>

Utility function for getting an ETA for when a target will be reached by a resource with a known (and assumed consistent) gain.

Parameters ​

resource ​

Resource

The resource that will be increasing over time.

rate ​

MaybeRefOrGetter<DecimalSource>

The rate at which the resource is increasing.

target ​

MaybeRefOrGetter<DecimalSource>

The target amount of the resource to estimate the duration until.

Returns ​

ComputedRef<string>

Defined in ​

profectus/src/data/common.tsx:424