나는 바보 같은 문제가있다. 나는 C++ 11 헤더로 전환하려고하고 그 중 하나는 크로노입니다. 하지만 제 문제는 시간 작업의 결과가 나올 수 없다는 것입니다. 예를 들어 :std :: chrono and cout
auto t=std::chrono::high_resolution_clock::now();
cout<<t.time_since_epoch();
이 제공 : ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char, _Traits = std::char_traits<char>, _Tp = std::chrono::duration<long int, std::ratio<1l, 1000000l> >]’
의 인수 하나를 초기화
이 ... /usr/include/c++/4.6/ostream
cout<<(uint64_t)t.time_since_epoch();
가 잘못 캐스트를 제공합니다
그 위키를 사용하지만, 결코 발견하지 못했습니다 ... tnx – NoSenseEtAl
now()의 두 호출 사이의 차이를 인쇄하고 time_since_epoch()를 포함하지 않으므로 링크 된 예제가 다르다는 점에 유의하십시오.실제로 time_since_epoch는 실제 에포크를 지정하지 않습니다 (time_point가있는 시계에 따라 다릅니다). 즉, 인쇄하는 기간은 신기원에 관한 정보가 없으면 의미가 없습니다. –