Function report |
Source Code:kernel\time\ntp.c |
Create Date:2022-07-28 10:43:29 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:his routine handles the overflow of the microsecond field* The tricky bits of code to handle the accurate clock support* were provided by Dave Mills (Mills@UDEL.EDU) of NTP fame.* They were originally developed for SUN and DEC kernels.
Proto:int second_overflow(time64_t secs)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| time64_t | secs |
| 403 | leap = 0 |
| 413 | If clock status bits: & sert leap (rw) Then |
| 417 | Else if clock status bits: & delete leap (rw) Then |
| 422 | Break |
| 424 | If Not (clock status bits: & sert leap (rw) ) Then |
| 427 | Else if secs == second value of the next pending leapsecond, or TIME64_MAX if no leap Then |
| 428 | leap = -1 |
| 433 | Break |
| 435 | If Not (clock status bits: & delete leap (rw) ) Then |
| 438 | Else if secs == second value of the next pending leapsecond, or TIME64_MAX if no leap Then |
| 439 | leap = 1 |
| 440 | second value of the next pending leapsecond, or TIME64_MAX if no leap = Located here for timespec[64]_valid_strict |
| 445 | Break |
| 447 | second value of the next pending leapsecond, or TIME64_MAX if no leap = Located here for timespec[64]_valid_strict |
| 448 | clock synchronization status* (TIME_ERROR prevents overwriting the CMOS clock) = leap second has occurred |
| 449 | Break |
| 451 | If Not (clock status bits: & (sert leap (rw) | delete leap (rw) )) Then clock synchronization status* (TIME_ERROR prevents overwriting the CMOS clock) = clock synchronized, no leap second |
| 453 | Break |
| 459 | If maximum error (usecs): > yond max. dispersion Then |
| 465 | tick_length = tick_length_base |
| 468 | ime adjustment (nsecs): -= delta |
| 469 | tick_length += delta |
| 472 | pps_dec_valid() |
| 474 | If Not time_adjust Then Go to out |
| 477 | If time_adjust > usecs Then |
| 483 | If time_adjust < -usecs Then |
| 489 | tick_length += time_adjust * NSEC_PER_USEC / NTP_INTERVAL_FREQ << NTP_SCALE_SHIFT |
| 491 | time_adjust = 0 |
| 493 | out : |
| 494 | Return leap |
| Name | Describe |
|---|---|
| accumulate_nsecs_to_secs | accumulate_nsecs_to_secs - Accumulates nsecs into secs* Helper function that accumulates the nsecs greater than a second* from the xtime_nsec field to the xtime_secs field.* It also calls into the NTP code to handle leapsecond processing. |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |