Commit Graph

3 Commits

Author SHA1 Message Date
sommerfeld 56cc62bbec Return the full width of the counter here. 2000-07-02 21:05:14 +00:00
sommerfeld bbca3924cd Replace "timestamp" with "counter" in previous change, to avoid any
possible confusion that it has anything to do with accurate
measurement of time.

New names:
	__HAVE_CPU_COUNTER
	cpu_counter()
	cpu_hascounter()
2000-06-06 01:33:15 +00:00
sommerfeld fae21c7be1 Let rnd(4) know how to read the (pentium and higher) cycle counter:
If __HAVE_CPU_TIMESTAMP is defined, <machine/rnd.h> exists and defines
two functions:
  1) 	u_int32_t cpu_timestamp(void);
returns the 32 low order bits of a reasonably high frequency counter.
  2)	int cpu_havetimestamp(void);
returns non-zero if cpu_timestamp() actually works.

The timestamp counter should run at a frequency greater than 1 MHz
(otherwise, microtime would be sufficient); other than that, the exact
frequency and origin of the counter are unspecified.
2000-06-05 21:15:22 +00:00