diff --git a/src/lib/time.h b/src/lib/time.h index 7887d84..9ab69d8 100644 --- a/src/lib/time.h +++ b/src/lib/time.h @@ -22,6 +22,6 @@ z__u64 z__time(void); z__u64 z__time_process(void); z__u64 z__time_tps(void); z__f64 z__time_delta(z__u64 process_0, z__u64 process_1); - +z__u64 z__time_mfps(z__u32 fps); #endif diff --git a/src/lib/z__time.c b/src/lib/z__time.c index ff03c26..126a734 100644 --- a/src/lib/z__time.c +++ b/src/lib/z__time.c @@ -52,6 +52,12 @@ z__u64 z__time_process(void) return clock(); } +z__u64 z__time_mfps(z__u32 fps) +{ + z__float x = 1.0f/fps; + return (z__u64)(x * 1000); +} + z__u64 z__time_tps(void) { return CLOCKS_PER_SEC;