mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Implement the toString method
llvm-svn: 17782
This commit is contained in:
parent
3dfb002523
commit
bd1d413e4e
@ -18,5 +18,21 @@
|
|||||||
|
|
||||||
#include "Unix.h"
|
#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
|
// vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
|
||||||
|
Loading…
Reference in New Issue
Block a user