Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Referensi Struct local_time_hw_device
#include <
local_time_hal.h
>
Definisi pada baris
57
file
local_time_hal.h
.
Metode yang digunakan untuk mengumpulkan data sinkronisasi tingkat rendah di lingkungan lab. Sebagian besar implementasi HAL hanya akan menetapkan anggota ini ke NULL, atau menampilkan -EINVAL untuk menunjukkan bahwa fungsi ini tidak didukung. HAL produksi tidak boleh mendukung metode ini.
Definisi pada baris
98
dari file
local_time_hal.h
.
Menampilkan frekuensi nominal (dalam hertz) penghitung waktu lokal seluruh sistem
Definisi di baris
77
dari file
local_time_hal.h
.
Menampilkan nilai saat ini dari penghitung waktu lokal seluruh sistem
Definisi di baris
70
dari file
local_time_hal.h
.
Menetapkan kecepatan slew HW osilator yang menggerakkan penghitung waktu lokal seluruh sistem. Jika berhasil, platform akan menampilkan 0. Platform yang tidak mendukung slew HW harus membiarkan metode ini ditetapkan ke NULL.
Nilai yang valid untuk rentang kecepatan berkisar dari MIN_INT16 hingga MAX_INT16. Implementasi platform harus mencoba memetakan rentang ini secara linear ke kecepatan slew min/maks hardware-nya.
Definisi di baris
89
dari file
local_time_hal.h
.
Dokumentasi untuk struct ini dibuat dari file berikut:
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# Android Hardware Abstraction Layer: local_time_hw_device Struct Reference\n\nlocal_time_hw_device Struct Reference\n=====================================\n\n[Data Fields](#pub-attribs) \nlocal_time_hw_device Struct Reference \n\n`\n#include \u003c\n`[local_time_hal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)`\n\u003e\n`\n\n|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| struct [hw_device_t](/reference/hal/structhw__device__t) | [common](/reference/hal/structlocal__time__hw__device#a86a0ca82dd3f02023e259b8b5e155dbe) |\n| ||\n| int64_t(\\* | [get_local_time](/reference/hal/structlocal__time__hw__device#aa2fced6a37dbd2b5f72c8148a52c611a) )(struct [local_time_hw_device](/reference/hal/structlocal__time__hw__device) \\*dev) |\n| ||\n| uint64_t(\\* | [get_local_freq](/reference/hal/structlocal__time__hw__device#a761e4dab7f805e4a1810a2214aabb2f3) )(struct [local_time_hw_device](/reference/hal/structlocal__time__hw__device) \\*dev) |\n| ||\n| int(\\* | [set_local_slew](/reference/hal/structlocal__time__hw__device#af05541302faa15c0eb8a04c0765297b0) )(struct [local_time_hw_device](/reference/hal/structlocal__time__hw__device) \\*dev, int16_t rate) |\n| ||\n| int(\\* | [get_debug_log](/reference/hal/structlocal__time__hw__device#a3c571551268d4ba712c129ac665d0ff5) )(struct [local_time_hw_device](/reference/hal/structlocal__time__hw__device) \\*dev, struct [local_time_debug_event](/reference/hal/structlocal__time__debug__event) \\*records, int max_records) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nDefinition at line\n[57](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\nof file\n[local_time_hal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\n.\n\nField Documentation\n-------------------\n\n\n|-----------------------------------------------------------------|\n| struct [hw_device_t](/reference/hal/structhw__device__t) common |\n\n\nCommon methods of the local time hardware device. This\n*must*\nbe the first member of\n[local_time_hw_device](/reference/hal/structlocal__time__hw__device)\nas users of this structure will cast a\n[hw_device_t](/reference/hal/structhw__device__t)\nto\n[local_time_hw_device](/reference/hal/structlocal__time__hw__device)\npointer in contexts where it's known the\n[hw_device_t](/reference/hal/structhw__device__t)\nreferences a\n[local_time_hw_device](/reference/hal/structlocal__time__hw__device)\n.\n\n\nDefinition at line\n[64](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\nof file\n[local_time_hal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\n.\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* get_debug_log)(struct [local_time_hw_device](/reference/hal/structlocal__time__hw__device) \\*dev, struct [local_time_debug_event](/reference/hal/structlocal__time__debug__event) \\*records, int max_records) |\n\n\nA method used to collect low level sync data in a lab environments. Most HAL implementations will simply set this member to NULL, or return -EINVAL to indicate that this functionality is not supported. Production HALs should never support this method.\n\n\nDefinition at line\n[98](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\nof file\n[local_time_hal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\n.\n\n|----------------------------------------------------------------------------------------------------------------|\n| uint64_t(\\* get_local_freq)(struct [local_time_hw_device](/reference/hal/structlocal__time__hw__device) \\*dev) |\n\n\nReturns the nominal frequency (in hertz) of the system wide local time counter\n\n\nDefinition at line\n[77](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\nof file\n[local_time_hal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\n.\n\n|---------------------------------------------------------------------------------------------------------------|\n| int64_t(\\* get_local_time)(struct [local_time_hw_device](/reference/hal/structlocal__time__hw__device) \\*dev) |\n\n\nReturns the current value of the system wide local time counter\n\n\nDefinition at line\n[70](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\nof file\n[local_time_hal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\n.\n\n|-------------------------------------------------------------------------------------------------------------------------|\n| int(\\* set_local_slew)(struct [local_time_hw_device](/reference/hal/structlocal__time__hw__device) \\*dev, int16_t rate) |\n\n\nSets the HW slew rate of oscillator which drives the system wide local time counter. On success, platforms should return 0. Platforms which do not support HW slew should leave this method set to NULL.\n\n\nValid values for rate range from MIN_INT16 to MAX_INT16. Platform implementations should attempt map this range linearly to the min/max slew rate of their hardware.\n\n\nDefinition at line\n[89](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\nof file\n[local_time_hal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [local_time_hal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/local_time_hal.h)"]]