Commit graph

9 commits

Author SHA1 Message Date
Elliott Hughes
842e1cc17e Make systemTime() abort on bad input.
There's no CHECK in libutils, sadly.

Bug: http://b/157167405
Test: treehugger
Change-Id: I1532bf80ba7fdafad016610be3c782b547417126
2020-05-27 15:31:55 -07:00
Brett Chabot
1af6acc4d3 Use Android systemTime implementation for host linux.
The Android framework, notably android.view.Choreographer, assumes
that System.nanoTime and SystemClock.uptimeMills return consistent
values. This was true on device, but not on host.

This commit makes those values consistent on host linux. The necessary
support should be in place in kernels 2.6.39 and newer, which have been
available since 2012.

Test: m -j libutils
Change-Id: I833a89a810ae9fb3e8c01f6095ee2aca893c284f
2019-09-19 15:32:33 -07:00
Yi Kong
e1731a4f2e [libutils] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.

Test: m
Bug: 68236239
Change-Id: I5e89ec8c42151875439d2656475a8739ab9cb7dc
2018-07-16 18:11:34 -07:00
Mathias Agopian
22dbf3947f clean-up libutils includes
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
2017-03-03 14:47:47 -08:00
Elliott Hughes
9b828adfad Use __ANDROID__ instead of HAVE_ANDROID_OS.
Change-Id: I9967f3fd758c2a5b40be5b60ae72be7e2fb75136
2015-07-30 09:33:43 -07:00
Yabin Cui
4a6e5a3b64 Kill HAVE_PTHREADS.
Bug: 19083585
Change-Id: Ic09eb3dd250bc5c5b63cac7998f99f5fa007f407
2015-01-27 14:23:22 -08:00
Mark Salyzyn
5bed803664 libutils: turn on -Werror
- 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
2014-06-02 15:57:50 -07:00
Narayan Kamath
ea659643ee HAVE_POSIX_CLOCKS doesn't imply CLOCK_BOOTTIME.
HAVE_POSIX_CLOCKS imples clock_gettime,settime and
CLOCK_REALTIME / CLOCK_MONOTONIC.

CLOCK_BOOTTIME appears only on newer versions of glibc
and might only be supported on newer kernels.

Change-Id: I66e724a3593538c3b80de2c5f81a964d3fa96eaf
2014-04-10 20:19:20 +01:00
Alex Ray
d98e07fdf9 move libs/utils to libutils
Change-Id: I6cf4268599460791414882f91eeb88a992fbd29d
2013-08-02 14:40:08 -07:00
Renamed from libs/utils/Timers.cpp (Browse further)