-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dpf-18714): inNextMinutes operator
- Loading branch information
1 parent
b8d079f
commit 19060e4
Showing
32 changed files
with
600 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { CurrentTimeFacts, FactsService, RulesEngineService } from '@o3r/rules-engine'; | ||
import { BehaviorSubject } from 'rxjs'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class CurrentTimeFactsService extends FactsService<CurrentTimeFacts> { | ||
|
||
private currentTimeSubject$ = new BehaviorSubject(new Date('2023-11-2').getTime()); | ||
/** @inheritDoc */ | ||
public facts = { | ||
o3rCurrentTime: this.currentTimeSubject$.asObservable() | ||
}; | ||
|
||
constructor(rulesEngine: RulesEngineService) { | ||
super(rulesEngine); | ||
} | ||
|
||
/** Compute the current time */ | ||
public tick() { | ||
this.currentTimeSubject$.next(Date.now()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.