--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../aros.css' --->
| ReadBattClock() | ReadBattClockMem() | ResetBattClock() | WriteBattClock() |
| WriteBattClockMem() |
ULONG ReadBattClock();
Return the value stored in the battery back up clock. This value is the number of seconds that have elapsed since midnight on the 1st of January 1978 (00:00:00 1.1.1978). If the value of the battery clock is invalid, then the clock will be reset.
The number of seconds since 1.1.1978 00:00:00
ULONG ReadBattClockMem(
ULONG offset,
ULONG length );
Read a field of up to 32 bits out of the battery backed up memory of the real time clock. This is the storage battmem.resource is built on; normal applications should use that resource instead.
offset - bit offset of the field, counted from the first bit of
the battery memory.
length - size of the field in bits. Values above 32 are clamped
to 32.
The field, right aligned. Zero if the clock has no battery memory, or if offset lies beyond the end of it.
Not all clock chips have battery backed up memory. The MSM6242B fitted to some machines has none, and this function returns 0 there.
void ResetBattClock();
Reset the system battery-backed-up clock. This will reset the clock back to 0 seconds (or midnight, 1st Jan 1978).
None.
The clock will be reset.
This function may do nothing when the battery backed up clock either doesn't exist, or may not be writable by the operating system.
void WriteBattClock(
ULONG time );
Set the system's battery backed up clock to the time specified. The value should be the number of seconds since 00:00:00 on 1.1.1978.
time - The number of seconds elapsed since 00:00:00 1.1.1978
The clock will be set.
This may not do anything on some systems where the battery backed up clock either doesn't exist, or may not be writable.
void WriteBattClockMem(
ULONG data,
ULONG offset,
ULONG length );
Write a field of up to 32 bits into the battery backed up memory of the real time clock. This is the storage battmem.resource is built on; normal applications should use that resource instead.
data - the field value, right aligned.
offset - bit offset of the field, counted from the first bit of
the battery memory.
length - size of the field in bits. Values above 32 are clamped
to 32.
Not all clock chips have battery backed up memory. The MSM6242B fitted to some machines has none, and this function does nothing there. Writes that start beyond the end of the battery memory are ignored; writes that run past the end are truncated.