1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

Implement the toString method

llvm-svn: 17782
This commit is contained in:
Reid Spencer 2004-11-14 22:10:08 +00:00
parent 3dfb002523
commit bd1d413e4e

View File

@ -18,5 +18,21 @@
#include "Unix.h"
#include <time.h>
namespace llvm {
using namespace sys;
std::string TimeValue::toString() {
char buffer[32];
time_t ourTime = time_t(this->toEpochTime());
::asctime_r(::localtime(&ourTime), buffer);
std::string result(buffer);
return result.substr(0,24);
}
}
// vim: sw=2 smartindent smarttab tw=80 autoindent expandtab