summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 705a778..1277047 100644
--- a/src/util.h
+++ b/src/util.h
@@ -181,4 +181,10 @@ inline U64 u_tick() {
inline F64 u_time() {
constexpr F64 NSEC_TO_SEC = 1.f / T_SEC;
return u_tick() * NSEC_TO_SEC;
+}
+
+inline void u_write_to_file( const char* str, const char* file ) {
+ FILE* f = fopen( file, "w" );
+ fwrite( str, 1, strlen( str ), f );
+ fclose( f );
} \ No newline at end of file