concurrent timestamp check in relation sorting algorithm