llvm-6502/lib/System/Win32/TimeValue.inc
Reid Spencer 8bf7fba10b Per code review:
* get rid of (void) construct in function declarations
* make toString a const member
* add a default implementation of toString for Win32


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17873 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:22:17 +00:00

40 lines
1.3 KiB
C++

//===- Win32/TimeValue.cpp - Win32 TimeValue Implementation -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by Jeff Cohen and is distributed under the
// University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file provides the Win32 implementation of the TimeValue class.
//
//===----------------------------------------------------------------------===//
#include "Win32.h"
namespace llvm {
using namespace sys;
//===----------------------------------------------------------------------===//
//=== WARNING: Implementation here must contain only Win32 specific code.
//===----------------------------------------------------------------------===//
TimeValue TimeValue::now() {
__int64 ft;
GetSystemTimeAsFileTime(reinterpret_cast<FILETIME *>(&ft));
return TimeValue(
static_cast<TimeValue::SecondsType>( ft / 10000000 +
Win32ZeroTime.seconds_ ),
static_cast<TimeValue::NanoSecondsType>( (ft % 10000000) * 100) );
}
std::string TimeValue::toString() const {
return "Don't know how to conver time on Win32";
}
// vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
}