RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

RTC_Adjust (changes)

Showing changes from revision #1 to #2: Added | Removed | Changed

RTC
» SWI Calls
» RTC_Adjust

RTC_Adjust

(SWI &594C3)
Entry
R0 Time error low word
R1 Time error high word
R2 Time span to apply correction over (centiseconds)
R3 Priority
Exit
- All registers preserved

Use

The purpose of this call is to request a correction to be applied to the RTC.

R0 and R1 form a signed 64 bit integer giving the correction value to be applied (in units of centiseconds). R2 specifies the length of time to apply the correction over.

R3 is used to specify a priority value, with higher values indicating a higher priority.

Notes

The RTC module will only apply one correction at a time. If it is already performing a correction, and a new request is received at a lower priority level than the current correction, then the request will be rejected and an error will be returned.

The automatic synchronisation of the soft clock with the RTC is performed using a priority level of &1000000 – using a priority level lower than this is guaranteed to fail and therefore pointless. NetTime? uses a priority level of &2000000.

An error will also be returned if an attempt is made to exceed the limits of the 5 byte time format that RISC OS uses internally.

If a request is made to perform a small time correction, the module will skew the soft clock by adjusting the rate of the hardware timer that drives the 100Hz TickerV interrupt. The timer will remain close enough to its original frequency that software is unlikely to be able to determine that anything unusual is happening. Note that current versions of the module will not adjust the hardware RTC in this case.

If a request is made to perform a large time correction, the module will avoid skewing the hardware timer and will instead apply the time correction immediately, via the Territory_SetTime SWI. This will result in all software seeing a visible jump in the current time, with both the soft clock and hardware RTC updated to the new time.

See also

  • Territory_SetTime
Revised on April 22, 2015 13:42:55 by Jeffrey Lee (213) (5.148.5.244)
Edit | Back in time (1 revision) | Hide changes | History | Views: Print | Source | Linked from: RTC SWI Calls, RTC, Territory_SetTime

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys