Wouldn't it be better if https://github.com/rstoyanchev/spring-websocket-test/blob/master/src/main/java/org/springframework/samples/websocket/snake/SnakeTimer.java is a bean, injected into the handler, rather than a class with static fields and methods?
In reality, one may need to inject other beans into that one, make use of proxies, etc. so it would be nice for an example to present it as a spring bean.