Title: Hierarchical timestamping algorithm