1 //===- Win32/TimeValue.cpp - Win32 TimeValue Implementation -----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Jeff Cohen and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file provides the Win32 specific implementation of the TimeValue class.
12 //===----------------------------------------------------------------------===//
19 //===----------------------------------------------------------------------===//
20 //=== WARNING: Implementation here must contain only Win32 specific code.
21 //===----------------------------------------------------------------------===//
23 TimeValue TimeValue::now() {
25 GetSystemTimeAsFileTime(reinterpret_cast<FILETIME *>(&ft));
28 static_cast<TimeValue::SecondsType>( ft / 10000000 +
29 Win32ZeroTime.seconds_ ),
30 static_cast<TimeValue::NanoSecondsType>( (ft % 10000000) * 100) );
33 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab