I have two threads, each performing its own operations. My goal is to make the timestamps recorded by both threads as close to each other as possible.
long[] ts; // array of atomic longsThe objective is to minimize:
Math.abs(ts[1] - ts[0])Ideally, the difference should be as close to zero as possible.
What would be the best way to implement this in Java?
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/mechanical-sympathy/230fe176-f951-4b8c-a9fb-d38108e869c3n%40googlegroups.com.