How to save a constant updating value

isnt that what your looking for ?

I'm not looking for anything, but I don't think it's asking too much of you to at least compile code before you post it. There are different numbers of open and close parentheses in that snippet, so the code will NOT compile.

If it won't compile, it certainly won't do anything like OP might have wanted.