Fixed race condition + added double buffering of timing data