profectus-docs/assets/api_data_common_functions_estimateTime.md.DNOj12T7.js

2 lines
3.1 KiB
JavaScript
Raw Normal View History

import{_ as t,c as a,a0 as r,o}from"./chunks/framework.P9qPzDnn.js";const h=JSON.parse('{"title":"Function: estimateTime()","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/data/common/functions/estimateTime.md","filePath":"api/data/common/functions/estimateTime.md","lastUpdated":null}'),i={name:"api/data/common/functions/estimateTime.md"};function n(c,e,s,d,l,m){return o(),a("div",null,e[0]||(e[0]=[r('<p><a href="./../../../">Profectus</a> / <a href="./../">data/common</a> / estimateTime</p><h1 id="function-estimatetime" tabindex="-1">Function: estimateTime() <a class="header-anchor" href="#function-estimatetime" aria-label="Permalink to &quot;Function: estimateTime()&quot;"></a></h1><blockquote><p><strong>estimateTime</strong>(<code>resource</code>, <code>rate</code>, <code>target</code>): <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-computed" target="_blank" rel="noreferrer"><code>ComputedRef</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>Utility function for getting an ETA for when a target will be reached by a resource with a known (and assumed consistent) gain.</p><h2 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h2><h3 id="resource" tabindex="-1">resource <a class="header-anchor" href="#resource" aria-label="Permalink to &quot;resource&quot;"></a></h3><p><a href="./../../../features/resources/resource/interfaces/Resource"><code>Resource</code></a></p><p>The resource that will be increasing over time.</p><h3 id="rate" tabindex="-1">rate <a class="header-anchor" href="#rate" aria-label="Permalink to &quot;rate&quot;"></a></h3><p><a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a>&lt;<a href="./../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>&gt;</p><p>The rate at which the resource is increasing.</p><h3 id="target" tabindex="-1">target <a class="header-anchor" href="#target" aria-label="Permalink to &quot;target&quot;"></a></h3><p><a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a>&lt;<a href="./../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>&gt;</p><p>The target amount of the resource to estimate the duration until.</p><h2 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h2><p><a href="https://vuejs.org/guide/typescript/composition-api.html#typing-computed" target="_blank" rel="noreferrer"><code>ComputedRef</code></a>&lt;<code>string</code>&gt;</p><h2 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></a></h2><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/data/common.tsx#L424" target="_blank" rel="noreferrer">profectus/src/data/common.tsx:424</a></p>',18)]))}const p=t(i,[["render",n]]);export{h as __pageData,p as default};