diff options
author | Jack Sangdahl <[email protected]> | 2024-12-12 21:21:51 -0700 |
---|---|---|
committer | Jack Sangdahl <[email protected]> | 2024-12-12 21:21:51 -0700 |
commit | d7a9095a28587a87fbd9bf7f9993ac78e1672322 (patch) | |
tree | d2dff153bb766c94d6b503b1a82e9e875ae10449 /lab6_malloclab/clock.h | |
parent | 3f9abe494bb944d16edc8af17180d38957cadb56 (diff) | |
download | csci2400-d7a9095a28587a87fbd9bf7f9993ac78e1672322.tar.gz csci2400-d7a9095a28587a87fbd9bf7f9993ac78e1672322.zip |
Lab 6 Malloc Lab
Signed-off-by: Jack Sangdahl <[email protected]>
Diffstat (limited to 'lab6_malloclab/clock.h')
-rw-r--r-- | lab6_malloclab/clock.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lab6_malloclab/clock.h b/lab6_malloclab/clock.h new file mode 100644 index 0000000..54d26ac --- /dev/null +++ b/lab6_malloclab/clock.h @@ -0,0 +1,22 @@ +/* Routines for using cycle counter */ + +/* Start the counter */ +void start_counter(); + +/* Get # cycles since counter started */ +double get_counter(); + +/* Measure overhead for counter */ +double ovhd(); + +/* Determine clock rate of processor (using a default sleeptime) */ +double mhz(int verbose); + +/* Determine clock rate of processor, having more control over accuracy */ +double mhz_full(int verbose, int sleeptime); + +/** Special counters that compensate for timer interrupt overhead */ + +void start_comp_counter(); + +double get_comp_counter(); |