Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\rtc.h Create Date:2022-07-28 06:01:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Determine if we can call to driver to set the time

Proto:static inline bool rtc_tv_nsec_ok(s64 set_offset_nsec, struct timespec64 *to_set, const struct timespec64 *now)

Type:bool

Parameter:

TypeParameterName
s64set_offset_nsec
struct timespec64 *to_set set_delay_nsec == now +/- FUZZ
const struct timespec64 *now
237  TIME_SET_NSEC_FUZZ = TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ * 5
238  struct timespec64 delay = { seconds = 0, nanoseconds = set_offset_nsec}
241  set_delay_nsec == now +/- FUZZ = timespec64_add( * now, delay)
243  If nanoseconds < TIME_SET_NSEC_FUZZ Then
244  nanoseconds = 0
245  Return true
248  If nanoseconds > NSEC_PER_SEC - TIME_SET_NSEC_FUZZ Then
249  seconds ++
250  nanoseconds = 0
251  Return true
253  Return false
Caller
NameDescribe
sync_cmos_clock