brooklyncentral / brooklyn

This project has moved and is now part of the ASF
https://github.com/apache/incubator-brooklyn
72 stars 27 forks source link

HAManagerImpl uses currentTimeMillis ticker rather than nano time #1425

Closed sjcorbett closed 10 years ago

sjcorbett commented 10 years ago

System.nanoTime() should "only be used to measure elapsed time and is not related to any other notion of system or wall-clock time."

sjcorbett commented 10 years ago

Believe this should fix an issue where come web consoles reported 'last seen' as 44 years ago.

buildhive commented 10 years ago

Brooklyn Central » brooklyn #2361 SUCCESS This pull request looks good (what's this?)

grkvlt commented 10 years ago

If System.nanoTime() is the problem, then just get rid of Ticker and call System.currentTimeMillis() whenever appropriate.

aledsage commented 10 years ago

@sjcorbett looks good. @grkvlt for getting rid of ticker, are you suggesting therefore to write time-sensitive tests (but thus have slightly simpler production code)? Once we reach conclusion with @grkvlt then happy for this to be merged.

grkvlt commented 10 years ago

@sjcorbett @aledsage I'm convinced :frog: I'll merge this...