0
Files
src/rlz/lib/time_util_win.cc
Greg Thompson b2170dcecf Trim dependency creep in setup.exe by splitting RLZ into non-net and net bits.
This change introduces the //rlz:rlz_lib_no_network source_set for use
by Chrome's installer on Windows. This breaks a dependency on a slew of
networking pieces that bloat setup.exe. Results from building
chrome/installer/setup at r718552:

- before: 6536 build targets -- 2,590,720 bytes
- after : 2390 build targets -- 2,298,880 bytes

-   4,146 fewer build targets (63.43% reduction)
- 291,840 bytes smaller (11.26% reduction)

BUG=1026780

Change-Id: I99892e6b0b9f730e1467a9af1af55c42ddeb8903
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1932803
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719145}
2019-11-26 15:07:39 +00:00

23 lines
573 B
C++

// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "rlz/lib/time_util.h"
#include <windows.h>
namespace rlz_lib {
int64_t GetSystemTimeAsInt64() {
FILETIME now_as_file_time;
// Relative to Jan 1, 1601 (UTC).
::GetSystemTimeAsFileTime(&now_as_file_time);
LARGE_INTEGER integer;
integer.HighPart = now_as_file_time.dwHighDateTime;
integer.LowPart = now_as_file_time.dwLowDateTime;
return integer.QuadPart;
}
} // namespace rlz_lib