summaryrefslogtreecommitdiffstats
path: root/libutils/SystemClock.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't rely on transitively included headersJiyong Park2017-09-061-1/+1
| | | | | | | | | One must explicitly include what it need. time.h for clock_gettime Bug: 37629934 Test: build Change-Id: I992eac637f373b204aa161b0b26f5563e952c27e
* clean-up libutils includesMathias Agopian2017-03-031-5/+5
| | | | | | | | | | | | moved Foo.h as first include of Foo.cpp, and removed redundant includes. Made NativeHandle non virtual. Test: run & compile Bug: n/a Change-Id: I37fa746cd42c9ba23aba181f84cb6c619386406a
* SystemClock: elapsedRealtimeNano() should use clock_gettime() on LinuxGreg Hackmann2016-05-021-28/+9
| | | | | | | | | | | | | | We've removed the Android alarm driver from our supported kernels. clock_gettime(CLOCK_BOOTTIME) has been a viable option since 2.6.39, so there's no need for the legacy code path anymore. We can use this on Linux hosts too, since no one should be building Android on hosts with kernels that old. Bug: 28357356 Change-Id: I0aa164383c95e77c53d2c85883d83f85d4abc7b1 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* Remove debugging code for a fixed 3.6 kernel bug.Elliott Hughes2016-04-041-71/+6
| | | | Change-Id: If17d41d6151cd7b81677afc5d341d7aa788170e4
* Use __ANDROID__ instead of HAVE_ANDROID_OS.Elliott Hughes2015-07-301-2/+2
| | | | Change-Id: I9967f3fd758c2a5b40be5b60ae72be7e2fb75136
* Consistently use strerror in libutils.Elliott Hughes2015-06-301-1/+0
| | | | | | | | It's easier for people to debug, and side-steps the problem that errno values differ between architectures. Bug: http://b/17458391 Change-Id: I1db9b2cbb653839d3936b91e37e5cff02671318a
* Use __arm__ instead of ARCH_ARM.Elliott Hughes2014-12-041-1/+1
| | | | Change-Id: I777da5757f01d8328d5475e654d56d81dc802655
* libutils: turn on -WerrorMark Salyzyn2014-06-021-9/+7
| | | | | | | | | - Deal with some -Wunused issues - Override PRI macros (windows) - Revert use of PRI macros on off64_t (linux) - Deal with a gnu++11 complaince issue Change-Id: Ie66751293bd84477a5a6dfd8a57e700a16e36964
* SystemClock: use clock_gettime() on devices without /dev/alarmGreg Hackmann2013-12-171-16/+9
| | | | | | | | | | | On devices with an up-to-date kernel, the back-in-time bug affecting clock_gettime() has been fixed and it can safely be used as an alternative to the ANDROID_ALARM_GET_TIME ioctl. To ensure consistent behavior on existing devices, make clock_gettime() a fallback for when the alarm driver isn't available. Change-Id: I384af5e7ec9e73e0bad4b6b0f987a8ea4583cba6 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* Disable timestamp logging.Ben Cheng2013-09-231-0/+13
| | | | | | | | | The kernel problem has been fixed long time ago and the ad-hoc logging mechanism is not thread safe and can flood the log with spurious messages. BUG: 10899829 Change-Id: I63278db51295e744eed3e47dc8d4cfe621c0d8f7
* move libs/utils to libutilsAlex Ray2013-08-021-0/+155
Change-Id: I6cf4268599460791414882f91eeb88a992fbd29d