Time precision, wall clock, midi ticks

Have you seen this post by @robin.newman? I think it sounds quite close to what you want, so it might be a good starting point.