Closed dmitry-chistyakov closed 5 years ago
The idea is that you use and timesource and stick with it; similarly, you don't want to use different timesources each time your application is run. However, that could be documented a bit more clearly, I agree.
@dmitry-chistyakov Reading your question / issue again I'm not quite sure I understand correctly. Could you elaborate / provide an example maybe?
Closing because of no input / feedback
DefaultTimeSource implementation uses static Stopwatch which starts on first usage of the class. If you instantiate DefaultTimeSource later (as part of new IdGenerator for example) it counts ticks as current offset + elapsed time on static Stopwatch which may run for awhile. As a result timestamp bits show time in future. It may result non-unique identifiers in some scenarios.