Skip to content

Instantly share code, notes, and snippets.

@tommynyquist
Last active August 29, 2015 14:15
Show Gist options
  • Save tommynyquist/f3a06921b4372674f311 to your computer and use it in GitHub Desktop.
Save tommynyquist/f3a06921b4372674f311 to your computer and use it in GitHub Desktop.
Network time in Chromium.
base::Time network_time;
base::TimeDelta uncertainty;
if (!g_browser_process->network_time_tracker()->GetNetworkTime(
base::TimeTicks::Now(), &network_time, &uncertainty)) {
// Fallback to local time if network time is not available.
network_time = base::Time::Now();
}
if (network_time.is_null())
NOTREACHED();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment