While working on the DevTools profiler, I've noticed that durations are sometimes incorrect. This seems to be vaguely related to high/low priority state updates. Need to track this down more so I'm filing an issue for myself.
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */
import type {Fiber} from './ReactFiber';
import getComponentName from 'shared/getComponentName';
import {enableProfilerTimer} from 'shared/ReactFeatureFlags';
import warningWithoutStack from 'shared/warningWithoutStack';
import {now} from './ReactFiberHostConfig';
export type ProfilerTimer = {
  checkActualRenderTimeStackEmpty(): void,
  getCommitTime(): number,
  markActualRenderTimeStarted(fiber: Fiber): void,
  pauseActualRenderTimerIfRunning(): void,
  recordElapsedActualRenderTime(fiber: Fiber): void,
  resumeActualRenderTimerIfPaused(isProcessingBatchCommit: boolean): void,
  recordCommitTime(): void,
  recordElapsedBaseRenderTimeIfRunning(fiber: Fiber): void,
  resetActualRenderTimerStackAfterFatalErrorInDev(): void,
  startBaseRenderTimer(): void,
  stopBaseRenderTimerIfRunning(): void,
};
let commitTime: number = 0;
function getCommitTime(): number {