A partir de 27 de março de 2025, recomendamos usar android-latest-release
em vez de aosp-main
para criar e contribuir com o AOSP. Para mais informações, consulte Mudanças no AOSP.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Referência da estrutura local_time_hw_device
#include <
local_time_hal.h
>
Definição na linha
57
do arquivo
local_time_hal.h
.
Um método usado para coletar dados de sincronização de baixo nível em ambientes de laboratório. A maioria das implementações do HAL simplesmente define esse membro como NULL ou retorna -EINVAL para indicar que essa funcionalidade não tem suporte. Os HALs de produção nunca devem oferecer suporte a esse método.
Definição na linha
98
do arquivo
local_time_hal.h
.
Retorna a frequência nominal (em hertz) do contador de horário local do sistema
Definição na linha
77
do arquivo
local_time_hal.h
.
Retorna o valor atual do contador de horário local do sistema
Definição na linha
70
do arquivo
local_time_hal.h
.
Define a taxa de slew de hardware do oscilador que controla o contador de tempo local em todo o sistema. Em caso de sucesso, as plataformas devem retornar 0. As plataformas que não oferecem suporte à mudança de hardware devem deixar esse método definido como NULL.
Os valores válidos para o intervalo de taxa vão de MIN_INT16 a MAX_INT16. As implementações de plataforma precisam tentar mapear esse intervalo linearmente para a taxa de slew mínima/máxima do hardware.
Definição na linha
89
do arquivo
local_time_hal.h
.
A documentação desse struct foi gerada com base no seguinte arquivo:
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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)"]]