diff --git a/README.md b/README.md index 91288fb..143c893 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,10 @@ When in doubt simplify. * [Unified Turing Machine](https://github.com/Phuire-Research/Stratimux/blob/main/The-Unified-Turing-Machine.md) - The governing concept for this entire framework. ## Change Log ![Tests](https://github.com/Phuire-Research/Stratimux/actions/workflows/node.js.yml/badge.svg) +### Strong Fast Time v0.1.61 +* Created the new *axiumTimeOut* helper function + * This will add a specified action to the axium tail property after some specified time. + * This is used internally to handle the majority of asynchronous interactions ### Strong Fast **BREAKING** v0.1.59 5/06/24 * Removed the setTimeout trick in favor of a new tail property added to the axium concept, this paves the way for this pattern to be completely responsible for its own implementation. * **BREAKING** Method Subjects are now a tuple of [action: Action, async: Boolean]. This allows for the old setTimeout trick to be used in case the action stream isn't kicked into gear. diff --git a/src/concepts/axium/axium.concept.ts b/src/concepts/axium/axium.concept.ts index cafc0f9..cad1d5a 100644 --- a/src/concepts/axium/axium.concept.ts +++ b/src/concepts/axium/axium.concept.ts @@ -4,7 +4,7 @@ The Axium is a set of concepts that create a greater whole via their association within strategies, plans, modes, qualities, and principles. $>*/ /*<#*/ -import { BehaviorSubject, Subject, Subscription } from 'rxjs'; +import { Subject, Subscription } from 'rxjs'; import { Concept, Concepts } from '../../model/concept'; import { Action } from '../../model/action'; import { axiumPrinciple } from './axium.principle'; diff --git a/src/index.ts b/src/index.ts index f07f103..db80050 100644 --- a/src/index.ts +++ b/src/index.ts @@ -121,6 +121,7 @@ export type { dispatchOptions, Staging, UnifiedSubject, StagePlanner, NamedStage export { stageWaitForOpenThenIterate, stageWaitForOwnershipThenIterate, createStage } from './model/stagePlanner'; export type { OwnershipTicket, OwnershipTicketStub, OwnershipLedger } from './model/ownership'; export { ownership } from './model/ownership'; +export { axiumTimeOut } from './model/time'; //** Concept Exports */ // Axium diff --git a/src/model/time.ts b/src/model/time.ts index 0056266..16abeda 100644 --- a/src/model/time.ts +++ b/src/model/time.ts @@ -27,7 +27,7 @@ const handleTimedRun = (axiumState: AxiumState, func: (() => Action)[], timed: n axiumState.timer.push(setTimeout(() => handleTimedRun(axiumState, slot[0], slot[1]), someTime >= 0 ? someTime : 0)); } } - if (axiumState.lastRun < Date.now()) { + if (axiumState.lastRun < Date.now() && axiumState.tailTimer.length === 0) { axiumState.tailTimer.push(setTimeout(() => { axiumState.action$.next(createAction('Kick Axium')); }, 10));