Added profiling functions

This commit is contained in:
abdelrahman committed 2023-07-03 22:46:10 +01:00
1 parent 25d38c24b1
commit f0380ce638
2 files changed
+71

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#ifndef TIMER_H
#define TIMER_H
#include "aliases.h"
#ifdef __cplusplus
extern "C" {
#endif
u64 get_os_frequency();
// Time in nanoseconds
u64 get_os_time(void);
// CPU timer using rdtsc
u64 read_cpu_timer(void);
// CPU frequency in hz/sec
u64 get_cpu_freq(u64 milliseconds);
#ifdef __cplusplus
}
#endif
#endif // !TIMER_H