× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The hardware clock is what you called the system clock. CHGSYSVAL changes the hardware clock. The SNTP client from ConsultLine changes the hardware clock. I suppose one problem with this is, history log entries, job start times, etc., are based on the hardware clock. Changing this back and forth can have odd effects, I believe. In extreme cases, time-dependent products like ROBOT and the built-in job scheduler may miss a scheduled job.

The software clock is related to Unix-style functions, and the SNTP "server" that is now part of the system sets this value.

Here's the text from IBM on:

Software Clock APIs
The Software Clock APIs are:

- adjtime() (Adjust software clock) makes small adjustments to the software clock, either advancing or retarding it by the time specified in the delta parameter.

- gettimeofday() (Get current software clock time) retrieves the software-clock-based system time and places it in the timeval structure pointed to by tp.

- settimeofday() (Set current software clock time) sets the software clock to the time contained in the timeval structure pointed to by tp.

Note: These functions use header (include) files from the library QSYSINC, which is optionally installable. Make sure QSYSINC is installed on your system before using any of the functions. See for the file and member name of each header file.

The Software Clock is a system facility that determines the current Universal Coordinated Time (UTC) in seconds and microseconds since 1 January 1970, 00:00:00 (epoch-1970), and allows for time zone and daylight savings time information to be stored and retrieved. The current time is determined by keeping an internal 'time-delta', which is an offset from the machine clock (accessible by the mattod() API). When gettimeofday() is called to retrieve the software clock time, the time returned is calculated by taking the current machine time, subtracting the QUTCOFFSET system value, then adding the internal time-delta.

Calling the settimeofday() API sets or changes the time-delta (and optionally the time zone and the daylight savings time information), but does not affect the machine clock or the QUTCOFFSET system value. The adjtime() API slowly changes the time-delta, but does not affect the machine clock either. Adjustments are made at a rate of approximately 1 second of adjustment for every 100 seconds of elapsed time.

Most system components do not base their timestamps on the software clock, but use the machine clock instead.
================================================================================
HTH


Vern

At 10:35 AM 10/14/2003 -0500, you wrote:
What is the difference between the "hardware clock" and the "software
clock"?  Which does CHGSYSVAL change?


Jeff Carey Technical Specialist iSeries Technology



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.