Sharing a common time reference in a heterogeneous distributed system