summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/TimeValueTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove TimeValue classPavel Labath2016-11-161-50/+0
| | | | | | | | | | | | | | Summary: All uses have been replaced by appropriate std::chrono types, and the class is now unused. Reviewers: zturner, mehdi_amini Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D26447 llvm-svn: 287094
* Reapply "Add Chrono.h - std::chrono support header"Pavel Labath2016-10-201-0/+10
| | | | | | | | | This is a resubmission of r284590. The mingw build should be fixed now. The problem was we were matching time_t with _localtime_64s, which was incorrect on _USE_32BIT_TIME_T systems. Instead I use localtime_s, which should always evaluate to the correct function. llvm-svn: 284720
* Revert "Add Chrono.h - std::chrono support header"Pavel Labath2016-10-191-10/+0
| | | | | | | | | This reverts commit r284590 as it fails on the mingw buildbot. I think I know the fix, but I cannot test it right now. Will reapply when I verify it works ok. This reverts r284590. llvm-svn: 284615
* Add Chrono.h - std::chrono support headerPavel Labath2016-10-191-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: std::chrono mostly covers the functionality of llvm::sys::TimeValue and lldb_private::TimeValue. This header adds a bit of utility functions and typedefs, which make the usage of the library and porting code from TimeValues easier. Rationale: - TimePoint typedef - precision of system_clock is implementation defined - using a well-defined precision helps maintain consistency between platforms, makes it interact better with existing TimeValue classes, and avoids cases there a time point is implicitly convertible to a specific precision on some platforms but not on others. - system_clock::to_time_t only accepts time_points with the default system precision (even though time_t has only second precision on all platforms we support). To avoid the need for explicit casts, I have added a toTimeT() wrapper function. toTimePoint(time_t) was not strictly necessary, but I have added it for symmetry. Reviewers: zturner, mehdi_amini Subscribers: beanz, mgorny, llvm-commits, modocache Differential Revision: https://reviews.llvm.org/D25416 llvm-svn: 284590
* Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining ↵Duncan P. N. Exon Smith2016-04-051-5/+2
| | | | | | | | | | files; other minor fixes." This reverts commit r265454 since it broke the build. E.g.: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/22413/ llvm-svn: 265459
* Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; ↵Eugene Zelenko2016-04-051-2/+5
| | | | | | | | | | | | other minor fixes. Some Include What You Use suggestions were used too. Use anonymous namespaces in source files. Differential revision: http://reviews.llvm.org/D18778 llvm-svn: 265454
* [C++11] Use 'nullptr'.Craig Topper2014-06-081-1/+1
| | | | llvm-svn: 210442
* Use the overloaded std::abs rather than C's abs(int) to address Clang's ↵David Blaikie2014-02-261-1/+1
| | | | | | -Wabsolute-value llvm-svn: 202286
* Remove TimeValue::toPosixTime() -- it is buggy, semantics are unclear, and itsDmitri Gribenko2014-02-111-1/+2
| | | | | | only current user should be using toEpochTime() instead. llvm-svn: 201136
* unittests/Support: Add TimeValue.Win32FILETIME, corresponding to r186374.NAKAMURA Takumi2013-07-161-0/+16
| | | | llvm-svn: 186375
* Rename Support.TimeValue to TimeValue.time_t in unittests/Support.NAKAMURA Takumi2013-07-161-0/+23
llvm-svn: 186372
OpenPOWER on IntegriCloud