Firefly开源社区

打印 上一主题 下一主题

[Android] RK3568 Android11让系统ntp校准时间生效,需要设置些什么

20

积分

0

威望

0

贡献

技术小白

积分
20

RK3568 Android11让系统ntp校准时间生效,需要设置些什么

发表于 2024-6-4 19:07:27      浏览:134 | 回复:2        打印      只看该作者   [复制链接] 楼主
代码修改了/frameworks/base/core/res/res/values/config.xml的参数(可见附件截图)
<!-- Remote server that can provide NTP responses. -->
<string translatable="false" name="config_ntpServer">10.2.126.57</string>
<!-- Normal polling frequency in milliseconds -->
<integer name="config_ntpPollingInterval">120000</integer>
<!-- Try-again polling interval in milliseconds, in case the network request failed -->
<integer name="config_ntpPollingIntervalShorter">1000</integer>
<!-- Number of times to try again with the shorter interval, before backing
off until the normal polling interval. A value < 0 indicates infinite. -->
<integer name="config_ntpRetry">3</integer>
<!-- Timeout to wait for NTP server response in milliseconds. -->
<integer name="config_ntpTimeout">5</integer>
ntp设置时间操作如下(详细截图见附件):
ntp服务器地址(config_ntpServer)设置成功,这里本地ntp服务器
ntp请求间隔(config_ntpPollingInterval)设置成功,这里是2分钟
ntp限值(config_ntpTimeout)设置为5ms,clock offset应该不会一直在3百多ms。

想请教一下各位大神应该怎么配置才可以使ntp限值生效,可以实现画面同步

240521_change.png (262.2 KB, 下载次数: 0)

240521_change.png

240521_ntp.png (27.99 KB, 下载次数: 0)

240521_ntp.png
回复

使用道具 举报

95

积分

0

威望

0

贡献

技术小白

积分
95
发表于 2024-6-7 13:42:18        只看该作者  沙发
NTP功能不是默认开启的吗?
回复

使用道具 举报

20

积分

0

威望

0

贡献

技术小白

积分
20
发表于 2024-6-7 14:25:52        只看该作者  板凳
举个例子,目的是假如 本地时间为17:50:32:990 而ntp过来的时间为17:50:33:030 就需要把ntp的时间给更新到本地时间,配置config_ntpTimeout时间间隔没有生效
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表