map<AnyValueMsg> details;
array<ResourceEventMsg> previousEvents;
array<ResourceEventMsg> implicitlyIssuedStartEvents;
- string accumulatingAmount;
- string oldAccumulatingAmount;
- string previousValue;
- string currentValue;
+ string accumulatingAmount;
+ string oldAccumulatingAmount;
+ string previousValue;
+ string currentValue;
}
record ResourcesChargingStateMsg {
private[this] def processResourceEventsAfterLastKnownUserState() {
// Update the user state snapshot with fresh (ie not previously processed) events.
+ aquarium.resourceEventStore.foreachResourceEventOccurredInPeriod(
+ this._userStateModel.userID,
+ this._userStateModel.latestResourceEventOccurredMillis,
+ TimeHelpers.nowMillis()
+ )
}
private[this] def makeUserStateMsgUpToDate() {
_userAgreementModels.lastOption
}
- def latestResourceEventOccurredMillis = this._userStateMsg.getLatestResourceEventOccurredMillis
+ def latestResourceEventOccurredMillis = {
+ this._userStateMsg.getLatestResourceEventOccurredMillis
+ }
@inline final def totalCreditsAsReal: Real = Real(this._userStateMsg.getTotalCredits)
* @author Christos KK Loverdos <loverdos@gmail.com>
*/
-object TimeHelpers {
+final object TimeHelpers {
@inline
- def nowMillis() = System.currentTimeMillis()
+ final def nowMillis() = System.currentTimeMillis()
@inline
- def nowDate = new Date(nowMillis())
+ final def nowDate = new Date(nowMillis())
def secDiffOfMillis(ms0: Long, ms1: Long) = (ms1 - ms0).toDouble / 1000.0