#include <unistd.h> // access
-extern volatile time_t stgTime;
-
namespace STG
{
//-----------------------------------------------------------------------------
inline
UserProperty<T>::UserProperty(T& val)
: value(val),
- modificationTime(stgTime),
+ modificationTime(time(NULL)),
beforeNotifiers(),
afterNotifiers()
{
inline
void UserProperty<T>::ModifyTime() noexcept
{
- modificationTime = stgTime;
+ modificationTime = time(NULL);
}
//-----------------------------------------------------------------------------
template <typename T>
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 <typename T>