summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Linux
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-09-25 08:32:37 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-09-25 08:32:37 +0000
commitf71143c3e54d9227f81e3af3917342600bd959db (patch)
treed2bf4d615142e6727b93dd11d9d3f5fce52b33ea /llvm/lib/System/Linux
parent004ef2847be47740b9d281e39e73ba51171e8b41 (diff)
downloadbcm5719-llvm-f71143c3e54d9227f81e3af3917342600bd959db.tar.gz
bcm5719-llvm-f71143c3e54d9227f81e3af3917342600bd959db.zip
Updated to reflect changes in the interface of TimeValue::now().
llvm-svn: 16515
Diffstat (limited to 'llvm/lib/System/Linux')
-rw-r--r--llvm/lib/System/Linux/TimeValue.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/System/Linux/TimeValue.cpp b/llvm/lib/System/Linux/TimeValue.cpp
index c0cd30b4879..b58cf82fe03 100644
--- a/llvm/lib/System/Linux/TimeValue.cpp
+++ b/llvm/lib/System/Linux/TimeValue.cpp
@@ -23,15 +23,16 @@ using namespace sys;
//=== and must not be generic UNIX code (see ../Unix/TimeValue.cpp)
//===----------------------------------------------------------------------===//
-void TimeValue::now() {
+TimeValue TimeValue::now() {
struct timeval the_time;
timerclear(&the_time);
if (0 != ::gettimeofday(&the_time,0))
ThrowErrno("Couldn't obtain time of day");
- this->set( static_cast<TimeValue::SecondsType>( the_time.tv_sec ),
- static_cast<TimeValue::NanoSecondsType>( the_time.tv_usec *
- NANOSECONDS_PER_MICROSECOND ) );
+ return TimeValue(
+ static_cast<TimeValue::SecondsType>( the_time.tv_sec ),
+ static_cast<TimeValue::NanoSecondsType>( the_time.tv_usec *
+ NANOSECONDS_PER_MICROSECOND ) );
}
// vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
OpenPOWER on IntegriCloud