[DEBUG] correct build on Android

This commit is contained in:
Edouard DUPIN 2017-04-24 21:15:11 +02:00
parent 1ac238922c
commit d4b240ac1f

View File

@ -125,7 +125,7 @@ int64_t echrono::Time::count() {
}
std::ostream& echrono::operator <<(std::ostream& _os, const echrono::Time& _obj) {
/*
#ifdef __TARGET_OS__Android
std::chrono::nanoseconds ns = std::chrono::duration_cast<std::chrono::nanoseconds>(_obj.get().time_since_epoch());
int64_t totalSecond = ns.count()/1000000000;
int64_t millisecond = (ns.count()%1000000000)/1000000;
@ -167,9 +167,10 @@ std::ostream& echrono::operator <<(std::ostream& _os, const echrono::Time& _obj)
_os << microsecond << "us ";
}
_os << nanosecond << "ns ";
*/
# else
std::time_t now_c = std::chrono::system_clock::to_time_t(_obj.get());
_os << std::put_time(std::localtime(&now_c), "%F %T");
# endif
return _os;
}