X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/20d4dd0571e75d254444acf755a01b48a691c7c2..bc6cac0e474dfe2feb4983aef98f99e23a98ffc4:/include/stg/user_property.h diff --git a/include/stg/user_property.h b/include/stg/user_property.h index 7c65f962..529d854a 100644 --- a/include/stg/user_property.h +++ b/include/stg/user_property.h @@ -22,8 +22,6 @@ #include // access -extern volatile time_t stgTime; - namespace STG { //----------------------------------------------------------------------------- @@ -186,7 +184,7 @@ template inline UserProperty::UserProperty(T& val) : value(val), - modificationTime(stgTime), + modificationTime(time(NULL)), beforeNotifiers(), afterNotifiers() { @@ -196,7 +194,7 @@ template inline void UserProperty::ModifyTime() noexcept { - modificationTime = stgTime; + modificationTime = time(NULL); } //----------------------------------------------------------------------------- template @@ -209,14 +207,14 @@ void UserProperty::Set(const T& rvalue) auto ni = beforeNotifiers.begin(); while (ni != beforeNotifiers.end()) - (*ni++)->Notify(oldVal, rvalue); + (*ni++)->notify(oldVal, rvalue); value = rvalue; - modificationTime = stgTime; + modificationTime = time(NULL); ni = afterNotifiers.begin(); while (ni != afterNotifiers.end()) - (*ni++)->Notify(oldVal, rvalue); + (*ni++)->notify(oldVal, rvalue); } //----------------------------------------------------------------------------- template