I am using the SYSTEM_CLOCK function in a simple timing logic:
CALL SYSTEM_CLOCK (COUNT, COUNT_RATE, COUNT_MAX)
All 3 arguments are optional and get changed in this program. I am finding that the second argument can be 10000 or 1000000 depending on the compiler used.
Using the Portland compiler it is 1000000 on 3 different tested operating systems (WinXP, Vista 32 and Vista 64). This seems to be independent of what processor I run it on.
Since all 3 arguments seem to always be INTEGER*4 based, independently how I declare them, the longest possible time obviously depends on that clock rate (which I divide by to get the time).
The Portland documentation says that COUNT_RATE is always 1000 (??)
I already have a workaround (timing can be done many ways) but I am interested to find out
- whether the documentation might need an update
- whether maybe there is an option to change the COUNT_RATE used
- what the clock rate depends on. I assume it’s not always the real clock rate since I am getting different values with different compilers but a constant value with different computers/processors